@lemon-fe/components 1.3.7 → 1.3.9

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.
@@ -18,7 +18,9 @@ import { useDebounce } from '@lemon-fe/hooks';
18
18
  export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props, ref) {
19
19
  var placeholder = props.placeholder,
20
20
  searchFields = props.searchFields,
21
- focusColumn = props.focusColumn;
21
+ focusColumn = props.focusColumn,
22
+ _props$clearSelection = props.clearSelection,
23
+ clearSelection = _props$clearSelection === void 0 ? true : _props$clearSelection;
22
24
  var defaultState = useMemo(function () {
23
25
  return {
24
26
  keywords: '',
@@ -102,7 +104,7 @@ export default /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Search(props,
102
104
  }
103
105
  }
104
106
  } else {
105
- node.setSelected(true, true);
107
+ node.setSelected(true, clearSelection);
106
108
  }
107
109
  };
108
110
  var handlePrev = function handlePrev() {
@@ -132,6 +132,11 @@ export interface DataGridSearch {
132
132
  */
133
133
  searchFields?: string[];
134
134
  placeholder?: string;
135
+ /**
136
+ * @description
137
+ * true: 清除搜索前的选中数据,false: 保留搜索前的选中数据; 默认为true;
138
+ */
139
+ clearSelection?: boolean;
135
140
  /**
136
141
  * @description
137
142
  * 搜索后聚焦到哪个单元格,一般情况不要使用
@@ -81,6 +81,7 @@ var getStorageData = function getData(storageKey) {
81
81
  return null;
82
82
  };
83
83
  var setStorageData = function setData(storageKey, data, action) {
84
+ console.log(action);
84
85
  localStorage.setItem("filter-storage-".concat(storageKey), JSON.stringify(data));
85
86
  };
86
87
  var DEFAULT_TAB_ALIAS = '$$default';
@@ -290,7 +291,10 @@ function Filter(originalProps) {
290
291
  break;
291
292
  case 13:
292
293
  if (storageKey) {
293
- setStorageData(storageKey, searches, action);
294
+ setStorageData(storageKey, searches, {
295
+ type: action,
296
+ target: target
297
+ });
294
298
  }
295
299
  case 14:
296
300
  case "end":
@@ -12,5 +12,5 @@ declare const Modal: Pick<React.FC<AntdModalProps> & import("antd/lib/modal/conf
12
12
  useModal: typeof import("antd/lib/modal/useModal").default;
13
13
  destroyAll: () => void;
14
14
  config: typeof import("antd/lib/modal/confirm").modalGlobalConfig;
15
- }, "success" | "error" | "warning" | "info" | "warn" | "confirm" | "useModal" | "config" | "destroyAll"> & typeof LemonModal;
15
+ }, "warning" | "error" | "success" | "info" | "warn" | "confirm" | "useModal" | "destroyAll" | "config"> & typeof LemonModal;
16
16
  export default Modal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "b41f095b38f4e4d26ea4554c4c5680aa868f41d9"
61
+ "gitHead": "7656e6f471ff70026e3f2b550b122d06d9495ae0"
62
62
  }