@hi-ui/check-select 4.4.2 → 4.4.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @hi-ui/check-select
2
2
 
3
+ ## 4.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2828](https://github.com/XiaoMi/hiui/pull/2828) [`b8679ce3e`](https://github.com/XiaoMi/hiui/commit/b8679ce3e7fab435fd126901e6e8b23268bcf712) Thanks [@xiamiao1121](https://github.com/xiamiao1121)! - fix: 修复异步搜索中,搜索结果中关键字没有高亮显示问题
8
+
9
+ - Updated dependencies [[`3afbf239e`](https://github.com/XiaoMi/hiui/commit/3afbf239e816ede48d6a85cbd99b6b099b8c8eb3)]:
10
+ - @hi-ui/env@4.0.7
11
+
12
+ ## 4.4.3
13
+
14
+ ### Patch Changes
15
+
16
+ - [#2795](https://github.com/XiaoMi/hiui/pull/2795) [`234687ee0`](https://github.com/XiaoMi/hiui/commit/234687ee0ea4de16faaf771ea6a599bc43971249) Thanks [@xiamiao1121](https://github.com/xiamiao1121)! - fix: 修复 onClear 设置后没触发问题
17
+
3
18
  ## 4.4.2
4
19
 
5
20
  ### Patch Changes
@@ -75,6 +75,7 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
75
75
  visible = _a.visible,
76
76
  onOpen = _a.onOpen,
77
77
  onClose = _a.onClose,
78
+ onClear = _a.onClear,
78
79
  appearance = _a.appearance,
79
80
  invalid = _a.invalid,
80
81
  dataSource = _a.dataSource,
@@ -93,7 +94,7 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
93
94
  suffix = _a.suffix,
94
95
  onKeyDownProp = _a.onKeyDown,
95
96
  keywordProp = _a.keyword,
96
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown", "keyword"]);
97
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "onClear", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown", "keyword"]);
97
98
  var i18n = core.useLocaleContext();
98
99
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkSelect.placeholder') : placeholderProp;
99
100
  // ************************** Picker ************************* //
@@ -163,7 +164,7 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
163
164
  if (_ret && _ret !== true) return _ret;
164
165
  }
165
166
  // 本地搜索执行默认高亮规则
166
- var highlight = !!searchValue && searchMode === 'filter';
167
+ var highlight = !!searchValue && (searchMode === 'filter' || searchMode === 'dataSource');
167
168
  var ret = highlight ? ( /*#__PURE__*/React__default["default"].createElement(Checkbox__default["default"], {
168
169
  checked: node.checked,
169
170
  disabled: node.disabled
@@ -307,6 +308,7 @@ var CheckSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
307
308
  value: value,
308
309
  // @ts-ignore
309
310
  onChange: tryChangeValue,
311
+ onClear: onClear,
310
312
  data: mergedData,
311
313
  invalid: invalid,
312
314
  onClick: function onClick(evt) {
@@ -61,6 +61,7 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
61
61
  visible = _a.visible,
62
62
  onOpen = _a.onOpen,
63
63
  onClose = _a.onClose,
64
+ onClear = _a.onClear,
64
65
  appearance = _a.appearance,
65
66
  invalid = _a.invalid,
66
67
  dataSource = _a.dataSource,
@@ -79,7 +80,7 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
79
80
  suffix = _a.suffix,
80
81
  onKeyDownProp = _a.onKeyDown,
81
82
  keywordProp = _a.keyword,
82
- rest = __rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown", "keyword"]);
83
+ rest = __rest(_a, ["prefixCls", "role", "className", "children", "disabled", "clearable", "showCheckAll", "showOnlyShowChecked", "placeholder", "displayRender", "onSelect", "height", "itemHeight", "virtual", "visible", "onOpen", "onClose", "onClear", "appearance", "invalid", "dataSource", "filterOption", "searchable", "render", "renderExtraFooter", "onSearch", "fieldNames", "customRender", "tagInputProps", "size", "prefix", "suffix", "onKeyDown", "keyword"]);
83
84
  var i18n = useLocaleContext();
84
85
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkSelect.placeholder') : placeholderProp;
85
86
  // ************************** Picker ************************* //
@@ -149,7 +150,7 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
149
150
  if (_ret && _ret !== true) return _ret;
150
151
  }
151
152
  // 本地搜索执行默认高亮规则
152
- var highlight = !!searchValue && searchMode === 'filter';
153
+ var highlight = !!searchValue && (searchMode === 'filter' || searchMode === 'dataSource');
153
154
  var ret = highlight ? ( /*#__PURE__*/React.createElement(Checkbox, {
154
155
  checked: node.checked,
155
156
  disabled: node.disabled
@@ -293,6 +294,7 @@ var CheckSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
293
294
  value: value,
294
295
  // @ts-ignore
295
296
  onChange: tryChangeValue,
297
+ onClear: onClear,
296
298
  data: mergedData,
297
299
  invalid: invalid,
298
300
  onClick: function onClick(evt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-select",
3
- "version": "4.4.2",
3
+ "version": "4.4.4",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -47,7 +47,7 @@
47
47
  "@hi-ui/checkbox": "^4.0.10",
48
48
  "@hi-ui/classname": "^4.0.5",
49
49
  "@hi-ui/dom-utils": "^4.0.7",
50
- "@hi-ui/env": "^4.0.5",
50
+ "@hi-ui/env": "^4.0.7",
51
51
  "@hi-ui/func-utils": "^4.0.4",
52
52
  "@hi-ui/highlighter": "^4.0.9",
53
53
  "@hi-ui/icons": "^4.0.19",