@hi-ui/tree-select 4.2.1 → 4.3.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,17 @@
1
1
  # @hi-ui/tree-select
2
2
 
3
+ ## 4.3.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), [`a883d8e19`](https://github.com/XiaoMi/hiui/commit/a883d8e197446ef0e7cefcc5cc44d21ed1d0807f)]:
12
+ - @hi-ui/highlighter@4.1.2
13
+ - @hi-ui/input@4.4.0
14
+
3
15
  ## 4.2.1
4
16
 
5
17
  ### Patch Changes
@@ -76,6 +76,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
76
76
  keywordProp = _a.keyword,
77
77
  onSearchProp = _a.onSearch,
78
78
  clearable = _a.clearable,
79
+ onClear = _a.onClear,
79
80
  invalid = _a.invalid,
80
81
  displayRenderProp = _a.displayRender,
81
82
  placeholderProp = _a.placeholder,
@@ -88,7 +89,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
88
89
  prefix = _a.prefix,
89
90
  suffix = _a.suffix,
90
91
  customRender = _a.customRender,
91
- rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "customRender"]);
92
+ rest = tslib.__rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "onClear", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "customRender"]);
92
93
  var i18n = core.useLocaleContext();
93
94
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('treeSelect.placeholder') : placeholderProp;
94
95
  var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
@@ -242,6 +243,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
242
243
  // disabled={disabled}
243
244
  size: size,
244
245
  clearable: clearable,
246
+ onClear: onClear,
245
247
  placeholder: placeholder,
246
248
  displayRender: displayRenderProp,
247
249
  prefix: prefix,
@@ -64,6 +64,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
64
64
  keywordProp = _a.keyword,
65
65
  onSearchProp = _a.onSearch,
66
66
  clearable = _a.clearable,
67
+ onClear = _a.onClear,
67
68
  invalid = _a.invalid,
68
69
  displayRenderProp = _a.displayRender,
69
70
  placeholderProp = _a.placeholder,
@@ -76,7 +77,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
76
77
  prefix = _a.prefix,
77
78
  suffix = _a.suffix,
78
79
  customRender = _a.customRender,
79
- rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "customRender"]);
80
+ rest = __rest(_a, ["prefixCls", "role", "className", "data", "dataSource", "disabled", "visible", "onOpen", "onClose", "fieldNames", "defaultExpandAll", "expandedIds", "defaultExpandedIds", "onExpand", "defaultValue", "value", "onChange", "searchable", "searchMode", "onLoadChildren", "render", "filterOption", "keyword", "onSearch", "clearable", "onClear", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "customRender"]);
80
81
  var i18n = useLocaleContext();
81
82
  var placeholder = isUndef(placeholderProp) ? i18n.get('treeSelect.placeholder') : placeholderProp;
82
83
  var _useUncontrolledToggl = useUncontrolledToggle({
@@ -230,6 +231,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
230
231
  // disabled={disabled}
231
232
  size: size,
232
233
  clearable: clearable,
234
+ onClear: onClear,
233
235
  placeholder: placeholder,
234
236
  displayRender: displayRenderProp,
235
237
  prefix: prefix,
@@ -102,6 +102,10 @@ export interface TreeSelectProps extends Omit<PickerProps, 'data' | 'onChange' |
102
102
  * 是否可清空
103
103
  */
104
104
  clearable?: boolean;
105
+ /**
106
+ * 点击关闭按钮时触发
107
+ */
108
+ onClear?: () => void;
105
109
  /**
106
110
  * 设置展现形式
107
111
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/tree-select",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -47,9 +47,9 @@
47
47
  "@hi-ui/classname": "^4.0.5",
48
48
  "@hi-ui/env": "^4.0.5",
49
49
  "@hi-ui/func-utils": "^4.0.4",
50
- "@hi-ui/highlighter": "^4.0.9",
50
+ "@hi-ui/highlighter": "^4.1.2",
51
51
  "@hi-ui/icons": "^4.0.19",
52
- "@hi-ui/input": "^4.1.1",
52
+ "@hi-ui/input": "^4.4.0",
53
53
  "@hi-ui/picker": "^4.1.6",
54
54
  "@hi-ui/popper": "^4.1.5",
55
55
  "@hi-ui/tree": "^4.6.1",