@hzab/list-render 1.6.0-bate2 → 1.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.6.0-bate2",
3
+ "version": "1.6.1",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -143,7 +143,8 @@ const ListRender = forwardRef(function (props, parentRef) {
143
143
  getList();
144
144
  }
145
145
 
146
- function onSearch(query) {
146
+ function onSearch(quer,source) {
147
+ const query = source === "queryRender" ? {...quer} :{...formQueryRef.current, ...quer};
147
148
  if (model && !model.query) {
148
149
  model.query = {};
149
150
  }
@@ -48,12 +48,12 @@ function QueryRender(props, parentRef) {
48
48
 
49
49
  if (!beforeQuerySearchResult) return;
50
50
  }
51
- return props.onSearch && props.onSearch(query);
51
+ return props.onSearch && props.onSearch(query, 'queryRender');
52
52
  }
53
53
 
54
54
  function onReset() {
55
55
  formRef.current?.formRender?.reset();
56
- props.onSearch && props.onSearch(_.cloneDeep(formRef?.current?.formRender?.values));
56
+ props.onSearch && props.onSearch(_.cloneDeep(formRef?.current?.formRender?.values), 'queryRender');
57
57
  }
58
58
 
59
59
  return (