diff --git a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/table.js b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/table.js index 19ea21f5c..0dcbc7d6c 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/table.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields/table.js @@ -1093,7 +1093,7 @@ export async function getTableApi(mainObject, fields, options){ if(options.isRelated){ api.url += "&recordId=${_master.recordId}"; } - // api.cache = 3000; + api.cache = 3000; api.data.$term = "$term"; api.data.term = "$term"; diff --git a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields_filter.js b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields_filter.js index 66ad2b224..047162c02 100644 --- a/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields_filter.js +++ b/packages/@steedos-widgets/amis-lib/src/lib/converter/amis/fields_filter.js @@ -99,21 +99,7 @@ export async function getObjectFieldsFilterBarSchema(objectSchema, ctx) { const btnSearchId = "btn_filter_form_search_" + new Date().getTime(); const filterFormSchema = await getObjectFieldsFilterFormSchema(ctx); const keywordsSearchBoxName = ctx.keywordsSearchBoxName || "__keywords"; - const clear__filterFormValues = ` - doAction( - { - "componentId": 'service_${ctx.crudId}', - "actionType": "setValue", - "args": { - "value": { - "__filterFormValues": null - } - } - } - ) - ` const onSearchScript = ` - ${clear__filterFormValues} const scope = event.context.scoped; var filterForm = scope.parent.parent.getComponents().find(function(n){ return n.props.type === "form"; @@ -170,7 +156,17 @@ export async function getObjectFieldsFilterBarSchema(objectSchema, ctx) { crudService && crudService.setData({isFieldsFilterEmpty, showFieldsFilter}); `; const onCancelScript = ` - ${clear__filterFormValues} + doAction( + { + "componentId": 'service_${ctx.crudId}', + "actionType": "setValue", + "args": { + "value": { + "__filterFormValues": null + } + } + } + ) const scope = event.context.scoped; var filterForm = scope.parent.parent.getComponents().find(function(n){ return n.props.type === "form";