@hi-ui/check-tree-select 4.4.1 → 4.5.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,11 @@
1
1
  # @hi-ui/check-tree-select
2
2
 
3
+ ## 4.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2878](https://github.com/XiaoMi/hiui/pull/2878) [`179fd7fef`](https://github.com/XiaoMi/hiui/commit/179fd7fef9d906ecec2c5f02de01b7fa16721c79) Thanks [@yang-x20](https://github.com/yang-x20)! - feat: 新增前置后置内容扩展功能
8
+
3
9
  ## 4.4.1
4
10
 
5
11
  ### Patch Changes
@@ -93,7 +93,9 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
93
93
  _a$size = _a.size,
94
94
  size = _a$size === void 0 ? 'md' : _a$size,
95
95
  customRender = _a.customRender,
96
- 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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps", "size", "customRender"]);
96
+ prefix = _a.prefix,
97
+ suffix = _a.suffix,
98
+ 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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
97
99
  var i18n = core.useLocaleContext();
98
100
  var placeholder = typeAssertion.isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
99
101
  var _useUncontrolledToggl = useToggle.useUncontrolledToggle({
@@ -301,7 +303,8 @@ var CheckTreeSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
301
303
  placeholder: placeholder,
302
304
  // @ts-ignore
303
305
  displayRender: displayRender,
304
- suffix: menuVisible ? /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null),
306
+ prefix: prefix,
307
+ suffix: [menuVisible ? /*#__PURE__*/React__default["default"].createElement(icons.UpOutlined, null) : /*#__PURE__*/React__default["default"].createElement(icons.DownOutlined, null), suffix],
305
308
  focused: menuVisible,
306
309
  appearance: appearance,
307
310
  value: value,
@@ -80,7 +80,9 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
80
80
  _a$size = _a.size,
81
81
  size = _a$size === void 0 ? 'md' : _a$size,
82
82
  customRender = _a.customRender,
83
- 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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps", "size", "customRender"]);
83
+ prefix = _a.prefix,
84
+ suffix = _a.suffix,
85
+ 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", "onSearch", "clearable", "invalid", "displayRender", "placeholder", "appearance", "virtual", "itemHeight", "height", "showCheckAll", "tagInputProps", "size", "customRender", "prefix", "suffix"]);
84
86
  var i18n = useLocaleContext();
85
87
  var placeholder = isUndef(placeholderProp) ? i18n.get('checkTreeSelect.placeholder') : placeholderProp;
86
88
  var _useUncontrolledToggl = useUncontrolledToggle({
@@ -288,7 +290,8 @@ var CheckTreeSelect = /*#__PURE__*/forwardRef(function (_a, ref) {
288
290
  placeholder: placeholder,
289
291
  // @ts-ignore
290
292
  displayRender: displayRender,
291
- suffix: menuVisible ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null),
293
+ prefix: prefix,
294
+ suffix: [menuVisible ? /*#__PURE__*/React.createElement(UpOutlined, null) : /*#__PURE__*/React.createElement(DownOutlined, null), suffix],
292
295
  focused: menuVisible,
293
296
  appearance: appearance,
294
297
  value: value,
@@ -149,6 +149,14 @@ export interface CheckTreeSelectProps extends Omit<PickerProps, 'data' | 'onChan
149
149
  * 自定义触发器
150
150
  */
151
151
  customRender?: React.ReactNode | ((option: CheckTreeSelectDataItem[]) => React.ReactNode);
152
+ /**
153
+ * 选择框前置内容
154
+ */
155
+ prefix?: React.ReactNode;
156
+ /**
157
+ * 选择框后置内容
158
+ */
159
+ suffix?: React.ReactNode;
152
160
  }
153
161
  /**
154
162
  * 在 checkedIdsSet 为数据合法的情况下,查找所有的半选中态的节点 ids
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/check-tree-select",
3
- "version": "4.4.1",
3
+ "version": "4.5.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",