@hi-ui/check-tree-select 4.6.2 → 4.7.0

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,16 @@
1
1
  # @hi-ui/check-tree-select
2
2
 
3
+ ## 4.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3172](https://github.com/XiaoMi/hiui/pull/3172) [`a883d8e19`](https://github.com/XiaoMi/hiui/commit/a883d8e197446ef0e7cefcc5cc44d21ed1d0807f) Thanks [@zyprepare](https://github.com/zyprepare)! - feat(mock-input): 增加 onClear 参数 (#3171)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`7bf0630`](https://github.com/XiaoMi/hiui/commit/7bf063053a73923af41c33370c31371325206276)]:
12
+ - @hi-ui/highlighter@4.1.2
13
+
3
14
  ## 4.6.2
4
15
 
5
16
  ### Patch Changes
@@ -82,6 +82,7 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
82
82
  keywordProp = _a.keyword,
83
83
  onSearchProp = _a.onSearch,
84
84
  clearable = _a.clearable,
85
+ onClear = _a.onClear,
85
86
  invalid = _a.invalid,
86
87
  displayRender = _a.displayRender,
87
88
  placeholderProp = _a.placeholder,
@@ -98,7 +99,7 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
98
99
  customRender = _a.customRender,
99
100
  prefix = _a.prefix,
100
101
  suffix = _a.suffix,
101
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
102
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "onClear", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
102
103
  var i18n = core.useLocaleContext();
103
104
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
104
105
  var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
@@ -311,6 +312,7 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
311
312
  // onClick={openMenu}
312
313
  // disabled={disabled}
313
314
  clearable: clearable,
315
+ onClear: onClear,
314
316
  placeholder: placeholder,
315
317
  // @ts-ignore
316
318
  displayRender: displayRender,
@@ -69,6 +69,7 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
69
69
  keywordProp = _a.keyword,
70
70
  onSearchProp = _a.onSearch,
71
71
  clearable = _a.clearable,
72
+ onClear = _a.onClear,
72
73
  invalid = _a.invalid,
73
74
  displayRender = _a.displayRender,
74
75
  placeholderProp = _a.placeholder,
@@ -85,7 +86,7 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
85
86
  customRender = _a.customRender,
86
87
  prefix = _a.prefix,
87
88
  suffix = _a.suffix,
88
- rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
89
+ rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "checkedMode", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "onClear", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "showOnlyShowChecked", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
89
90
  var i18n = useLocaleContext();
90
91
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
91
92
  var _useUncontrolledToggl = useUncontrolledToggle({
@@ -298,6 +299,7 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
298
299
  // onClick={openMenu}
299
300
  // disabled={disabled}
300
301
  clearable: clearable,
302
+ onClear: onClear,
301
303
  placeholder: placeholder,
302
304
  // @ts-ignore
303
305
  displayRender: displayRender,
@@ -115,6 +115,10 @@ export interface CheckTreeSelectProps extends Omit<PickerProps, 'data' | 'onChan
115
115
  * 是否可清空
116
116
  */
117
117
  clearable?: boolean;
118
+ /**
119
+ * 点击关闭按钮时触发
120
+ */
121
+ onClear?: () => void;
118
122
  /**
119
123
  * 设置展现形式
120
124
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-tree-select",
3
- "version": "4.6.2",
3
+ "version": "4.7.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -48,7 +48,7 @@
48
48
  "@hi-ui/classname": "^4.0.5",
49
49
  "@hi-ui/env": "^4.0.5",
50
50
  "@hi-ui/func-utils": "^4.0.4",
51
- "@hi-ui/highlighter": "^4.1.0",
51
+ "@hi-ui/highlighter": "^4.1.2",
52
52
  "@hi-ui/icons": "^4.0.19",
53
53
  "@hi-ui/picker": "^4.1.6",
54
54
  "@hi-ui/popper": "^4.1.5",