Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
feat: add hooks (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw authored May 16, 2019
1 parent ecf59c6 commit 7b3ab5f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/superset-ui-chart/src/models/ChartProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ interface ChartPropsConfig {
filters?: Filters;
formData?: SnakeCaseFormData;
height?: number;
hooks?: PlainObject;
onAddFilter?: HandlerFunction;
onError?: HandlerFunction;
payload?: QueryData;
Expand All @@ -45,6 +46,7 @@ export default class ChartProps {
formData: CamelCaseFormData;
rawFormData: SnakeCaseFormData;
height: number;
hooks: PlainObject;
onAddFilter: HandlerFunction;
onError: HandlerFunction;
payload: QueryData;
Expand All @@ -58,6 +60,7 @@ export default class ChartProps {
datasource = {},
filters = [],
formData = {},
hooks = {},
onAddFilter = NOOP,
onError = NOOP,
payload = {},
Expand All @@ -73,6 +76,7 @@ export default class ChartProps {
this.rawDatasource = datasource;
this.filters = filters;
this.formData = convertKeysToCamelCase(formData);
this.hooks = hooks;
this.rawFormData = formData;
this.onAddFilter = onAddFilter;
this.onError = onError;
Expand All @@ -89,6 +93,7 @@ ChartProps.createSelector = function create(): ChartPropsSelector {
input => input.filters,
input => input.formData,
input => input.height,
input => input.hooks,
input => input.onAddFilter,
input => input.onError,
input => input.payload,
Expand All @@ -101,6 +106,7 @@ ChartProps.createSelector = function create(): ChartPropsSelector {
filters,
formData,
height,
hooks,
onAddFilter,
onError,
payload,
Expand All @@ -114,6 +120,7 @@ ChartProps.createSelector = function create(): ChartPropsSelector {
filters,
formData,
height,
hooks,
onAddFilter,
onError,
payload,
Expand Down

0 comments on commit 7b3ab5f

Please sign in to comment.