@lemon-fe/components 1.3.7 → 1.3.8

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() {
@@ -17,7 +17,7 @@ declare const Editors: {
17
17
  Text: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
18
18
  Date: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
19
19
  Number: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
20
- Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
20
+ Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
21
21
  fieldNames?: {
22
22
  label: string;
23
23
  value: string;
@@ -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
  * 搜索后聚焦到哪个单元格,一般情况不要使用
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.8",
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": "4309f16775ec972984987ea6ff400e520ec98d21"
62
62
  }