superset/superset-frontend/temporary_superset_ui/superset-ui/plugins/plugin-filter-antd
2021-11-26 11:46:45 +08:00
..
src fix(demo): add antd css and implement action hook (#851) 2021-11-26 11:46:45 +08:00
test feat: native filter components (#840) 2021-11-26 11:46:44 +08:00
types feat: native filter components (#840) 2021-11-26 11:46:44 +08:00
package.json chore: publish v0.15.17 2021-11-26 11:46:45 +08:00
README.md feat: native filter components (#840) 2021-11-26 11:46:44 +08:00
tsconfig.json feat: native filter components (#840) 2021-11-26 11:46:44 +08:00

@superset-ui/plugin-filter-antd

Version

This plugin provides native filter plugins based on AntD.

Usage

Configure key, which can be any string, and register the plugin. This key will be used to lookup this chart throughout the app.

Below is an example of how to use the Select filter plugin.

import { AntdFilterSelectPlugin } from '@superset-ui/plugin-filter-antd';

new AntdFilterSelectPlugin()
  .configure({ key: 'plugin-filter-select' })
  .register();

Then use it via SuperChart.

<SuperChart
  chartType="plugin-filter-select"
  width={600}
  height={600}
  formData={...}
  queryData={{
    data: {...},
    // this hook gets called 
    hooks: { setExtraFormData: extraFormData => console.log(extraFormData) },
  }}
/>