@steedos-widgets/amis-lib 1.3.17-beta.1 → 1.3.17-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -2615,7 +2615,7 @@ async function getTableApi(mainObject, fields, options){
2615
2615
  if(options.isRelated){
2616
2616
  api.url += "&recordId=${_master.recordId}";
2617
2617
  }
2618
- api.cache = 3000;
2618
+ // api.cache = 3000;
2619
2619
 
2620
2620
  api.data.$term = "$term";
2621
2621
  api.data.term = "$term";
@@ -2876,6 +2876,20 @@ async function getTableApi(mainObject, fields, options){
2876
2876
  selfData.page = localListViewProps.page || 1;
2877
2877
  }
2878
2878
  }
2879
+
2880
+ // 列表视图(对象表格)筛选按钮表单输入框输入内容后,如果不按回车键或者搜索按钮,selfData中该输入框是没有最新值的。
2881
+ const __filterFormValues = api.body.__filterFormValues;
2882
+ if(__filterFormValues){
2883
+ let filterFormValues = JSON.parse(JSON.stringify(__filterFormValues)) || {};
2884
+ selfData = Object.assign({}, selfData, filterFormValues);
2885
+ }
2886
+ // “搜索此列表”搜索框同理。
2887
+ const __serachBoxValues = api.body.__serachBoxValues;
2888
+ if(__serachBoxValues){
2889
+ let serachBoxValues = JSON.parse(JSON.stringify(__serachBoxValues)) || {};
2890
+ selfData = Object.assign({}, selfData, serachBoxValues);
2891
+ }
2892
+
2879
2893
  delete selfData.context;
2880
2894
  delete selfData.global;
2881
2895
  sessionStorage.setItem(listViewPropsStoreKey, JSON.stringify(selfData));
@@ -10404,7 +10418,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
10404
10418
  const filtersFunction = ${field.filtersFunction || field._filtersFunction};
10405
10419
 
10406
10420
  if(filtersFunction && !inFilterForm){
10407
- const _filters = filtersFunction(filters, api.data.$self.__super.__super);
10421
+ const _filters = filtersFunction(filters, api.data.$self.__super);
10408
10422
  if(_filters && _filters.length > 0){
10409
10423
  filters.push(_filters);
10410
10424
  }