@hi-ui/tree-select 4.2.0 → 4.2.1
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 +9 -0
- package/lib/cjs/TreeSelect.js +4 -1
- package/lib/esm/TreeSelect.js +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# @hi-ui/tree-select
|
2
2
|
|
3
|
+
## 4.2.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#2994](https://github.com/XiaoMi/hiui/pull/2994) [`4d6b26507`](https://github.com/XiaoMi/hiui/commit/4d6b26507479030686d5da65e1bec8b353b80bfa) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 keyword 设置后数据没有过滤的问题
|
8
|
+
|
9
|
+
- Updated dependencies [[`908d6cd96`](https://github.com/XiaoMi/hiui/commit/908d6cd9657551203917230d9a91de45e65354c2)]:
|
10
|
+
- @hi-ui/tree@4.6.1
|
11
|
+
|
3
12
|
## 4.2.0
|
4
13
|
|
5
14
|
### Minor Changes
|
package/lib/cjs/TreeSelect.js
CHANGED
@@ -73,6 +73,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
73
73
|
onLoadChildren = _a.onLoadChildren,
|
74
74
|
titleRender = _a.render,
|
75
75
|
filterOption = _a.filterOption,
|
76
|
+
keywordProp = _a.keyword,
|
76
77
|
onSearchProp = _a.onSearch,
|
77
78
|
clearable = _a.clearable,
|
78
79
|
invalid = _a.invalid,
|
@@ -87,7 +88,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
87
88
|
prefix = _a.prefix,
|
88
89
|
suffix = _a.suffix,
|
89
90
|
customRender = _a.customRender,
|
90
|
-
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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "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"]);
|
91
92
|
var i18n = core.useLocaleContext();
|
92
93
|
var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('treeSelect.placeholder') : placeholderProp;
|
93
94
|
var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
|
@@ -176,6 +177,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
176
177
|
});
|
177
178
|
var _useSearchMode = useSearchMode.useSearchMode({
|
178
179
|
searchable: searchableProp,
|
180
|
+
keyword: keywordProp,
|
179
181
|
strategies: [dataSourceStrategy, customSearchStrategy, filterSearchStrategy, highlightSearchStrategy]
|
180
182
|
}),
|
181
183
|
stateInSearch = _useSearchMode.state,
|
@@ -231,6 +233,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
231
233
|
// onChange={tryChangeValue}
|
232
234
|
// data={mergedData}
|
233
235
|
searchable: searchable,
|
236
|
+
keyword: keywordProp,
|
234
237
|
onSearch: funcUtils.callAllFuncs(onSearchProp, onSearch),
|
235
238
|
loading: rest.loading !== undefined ? rest.loading : loading,
|
236
239
|
trigger: customRender ? typeof customRender === 'function' ? customRender(selectedItem) : customRender : ( /*#__PURE__*/React__default["default"].createElement(input.MockInput
|
package/lib/esm/TreeSelect.js
CHANGED
@@ -61,6 +61,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
61
61
|
onLoadChildren = _a.onLoadChildren,
|
62
62
|
titleRender = _a.render,
|
63
63
|
filterOption = _a.filterOption,
|
64
|
+
keywordProp = _a.keyword,
|
64
65
|
onSearchProp = _a.onSearch,
|
65
66
|
clearable = _a.clearable,
|
66
67
|
invalid = _a.invalid,
|
@@ -75,7 +76,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
75
76
|
prefix = _a.prefix,
|
76
77
|
suffix = _a.suffix,
|
77
78
|
customRender = _a.customRender,
|
78
|
-
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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "size", "prefix", "suffix", "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"]);
|
79
80
|
var i18n = useLocaleContext();
|
80
81
|
var placeholder = isUndef(placeholderProp) ? i18n.get('treeSelect.placeholder') : placeholderProp;
|
81
82
|
var _useUncontrolledToggl = useUncontrolledToggle({
|
@@ -164,6 +165,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
164
165
|
});
|
165
166
|
var _useSearchMode = useSearchMode({
|
166
167
|
searchable: searchableProp,
|
168
|
+
keyword: keywordProp,
|
167
169
|
strategies: [dataSourceStrategy, customSearchStrategy, filterSearchStrategy, highlightSearchStrategy]
|
168
170
|
}),
|
169
171
|
stateInSearch = _useSearchMode.state,
|
@@ -219,6 +221,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
219
221
|
// onChange={tryChangeValue}
|
220
222
|
// data={mergedData}
|
221
223
|
searchable: searchable,
|
224
|
+
keyword: keywordProp,
|
222
225
|
onSearch: callAllFuncs(onSearchProp, onSearch),
|
223
226
|
loading: rest.loading !== undefined ? rest.loading : loading,
|
224
227
|
trigger: customRender ? typeof customRender === 'function' ? customRender(selectedItem) : customRender : ( /*#__PURE__*/React.createElement(MockInput
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hi-ui/tree-select",
|
3
|
-
"version": "4.2.
|
3
|
+
"version": "4.2.1",
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"@hi-ui/input": "^4.1.1",
|
53
53
|
"@hi-ui/picker": "^4.1.6",
|
54
54
|
"@hi-ui/popper": "^4.1.5",
|
55
|
-
"@hi-ui/tree": "^4.
|
55
|
+
"@hi-ui/tree": "^4.6.1",
|
56
56
|
"@hi-ui/tree-utils": "^4.1.4",
|
57
57
|
"@hi-ui/type-assertion": "^4.0.4",
|
58
58
|
"@hi-ui/use-data-source": "^4.0.4",
|