diff --git a/app/client/src/widgets/MetaHOC.tsx b/app/client/src/widgets/MetaHOC.tsx index 62e605c846..f415d9d454 100644 --- a/app/client/src/widgets/MetaHOC.tsx +++ b/app/client/src/widgets/MetaHOC.tsx @@ -18,10 +18,6 @@ export interface WithMeta { propertyValue: any, actionExecution?: DebouncedExecuteActionPayload, ) => void; - syncUpdateWidgetMetaProperty: ( - propertyName: string, - propertyValue: any, - ) => void; } const withMeta = (WrappedWidget: typeof BaseWidget) => { @@ -34,7 +30,7 @@ const withMeta = (WrappedWidget: typeof BaseWidget) => { this.handleUpdateWidgetMetaProperty.bind(this), 200, { - leading: false, + leading: true, trailing: true, }, ); @@ -92,19 +88,6 @@ const withMeta = (WrappedWidget: typeof BaseWidget) => { ); }; - syncUpdateWidgetMetaProperty = ( - propertyName: string, - propertyValue: any, - ): void => { - const { updateWidgetMetaProperty } = this.context; - const { widgetId, widgetName } = this.props; - this.setState({ - [propertyName]: propertyValue, - }); - clearEvalPropertyCache(`${widgetName}.${propertyName}`); - updateWidgetMetaProperty(widgetId, propertyName, propertyValue); - }; - handleUpdateWidgetMetaProperty() { const { updateWidgetMetaProperty, executeAction } = this.context; const { widgetId, widgetName } = this.props; @@ -139,7 +122,6 @@ const withMeta = (WrappedWidget: typeof BaseWidget) => { ...this.props, ...this.state, updateWidgetMetaProperty: this.updateWidgetMetaProperty, - syncUpdateWidgetMetaProperty: this.syncUpdateWidgetMetaProperty, }; }; diff --git a/app/client/src/widgets/TableWidget/index.tsx b/app/client/src/widgets/TableWidget/index.tsx index 3f3bf11768..e39fa07fb8 100644 --- a/app/client/src/widgets/TableWidget/index.tsx +++ b/app/client/src/widgets/TableWidget/index.tsx @@ -694,7 +694,7 @@ class TableWidget extends BaseWidget { JSON.stringify(this.props.filteredTableData) ) { // Update filteredTableData meta property - this.props.syncUpdateWidgetMetaProperty( + this.props.updateWidgetMetaProperty( "filteredTableData", filteredTableData, );