Skip to content

Commit

Permalink
feat: add hooks (apache#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw authored and zhaoyongjie committed Nov 17, 2021
1 parent 0b01697 commit 64d1817
Showing 1 changed file with 7 additions and 0 deletions.
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 64d1817

Please sign in to comment.