@hi-ui/table 4.5.4 → 4.5.6-alpha.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.
@@ -32,6 +32,7 @@ var useEmbedExpand = require('./hooks/use-embed-expand.js');
32
32
  var TheadContent = require('./TheadContent.js');
33
33
  var ColGroupContent = require('./ColGroupContent.js');
34
34
  var TbodyContent = require('./TbodyContent.js');
35
+ var Table = require('./Table.js');
35
36
  function _interopDefaultCompat(e) {
36
37
  return e && _typeof(e) === 'object' && 'default' in e ? e : {
37
38
  'default': e
@@ -138,7 +139,8 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
138
139
  };
139
140
  var hasAvgColumn = false;
140
141
  columns.forEach(function (column, index$1) {
141
- if (index$1 === 0) {
142
+ // 行选中模式下,index=0是checkbox列,index=1才是第一列 ; fix issue: https://github.com/XiaoMi/hiui/issues/2863
143
+ if (index$1 === 0 || index$1 === 1 && columns[0].dataKey === Table.SELECTION_DATA_KEY) {
142
144
  // @ts-ignore
143
145
  avgRow.raw[column.dataKey] = i18n.get('table.average');
144
146
  }
@@ -166,7 +168,7 @@ var BaseTable = /*#__PURE__*/React.forwardRef(function (_a, ref) {
166
168
  };
167
169
  var hasSumColumn = false;
168
170
  columns.forEach(function (column, index$1) {
169
- if (index$1 === 0) {
171
+ if (index$1 === 0 || index$1 === 1 && columns[0].dataKey === Table.SELECTION_DATA_KEY) {
170
172
  // @ts-ignore
171
173
  sumRow.raw[column.dataKey] = i18n.get('table.total');
172
174
  }
@@ -33,7 +33,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
33
33
  var Scrollbar__default = /*#__PURE__*/_interopDefaultCompat(Scrollbar);
34
34
  var _role = 'table';
35
35
  var _prefix = classname.getPrefixCls(_role);
36
- var TableBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
36
+ var TableBody = /*#__PURE__*/React.forwardRef(function (_ref) {
37
37
  var _ref$prefixCls = _ref.prefixCls,
38
38
  prefixCls = _ref$prefixCls === void 0 ? _prefix : _ref$prefixCls,
39
39
  emptyContent = _ref.emptyContent;
@@ -54,6 +54,7 @@ var TableBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
54
54
  measureRowElementRef = _useTableContext.measureRowElementRef,
55
55
  scrollbar = _useTableContext.scrollbar,
56
56
  scrollLeft = _useTableContext.scrollLeft;
57
+ var virtualListRef = React.useRef(null);
57
58
  var cls = classname.cx(prefixCls + "-body");
58
59
  var getRequiredProps = useLatest.useLatestCallback(function (id) {
59
60
  return {
@@ -76,8 +77,9 @@ var TableBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
76
77
  }, [colWidths]);
77
78
  if (virtual) {
78
79
  // TODO: avg和summay row的逻辑
79
- var realHeight = (_a = scrollBodyElementRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
80
- var vMaxHeight = maxHeight ? !isNaN(Number(String(maxHeight).replace(/px/, ''))) ? Number(maxHeight) : realHeight : 300;
80
+ var realHeight = (_a = virtualListRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
81
+ var maxHeightNumStr = String(maxHeight).replace(/px$/, '');
82
+ var vMaxHeight = maxHeight ? !isNaN(Number(maxHeightNumStr)) ? Number(maxHeightNumStr) : realHeight : 300;
81
83
  return /*#__PURE__*/React__default["default"].createElement("div", {
82
84
  ref: scrollBodyElementRef,
83
85
  className: cls,
@@ -104,10 +106,12 @@ var TableBody = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
104
106
  width: rowWidth
105
107
  }
106
108
  }), typeAssertion.isArrayNonEmpty(transitionData) ? ( /*#__PURE__*/React__default["default"].createElement("div", {
109
+ ref: virtualListRef,
107
110
  style: {
108
111
  width: '100%',
109
112
  position: 'sticky',
110
- left: 0
113
+ left: 0,
114
+ maxHeight: maxHeight
111
115
  }
112
116
  }, /*#__PURE__*/React__default["default"].createElement(List["default"], {
113
117
  prefixCls: cls + "--virtual",
@@ -104,14 +104,16 @@ var useColWidth = function useColWidth(_ref) {
104
104
  }
105
105
  }, [getVirtualWidths, virtual]);
106
106
  useUpdateEffect.useUpdateEffect(function () {
107
- setColWidths(function (prev) {
108
- var _a;
109
- return ((_a = measureRowElementRef.current) === null || _a === void 0 ? void 0 : _a.childNodes.length) === prev.length ?
110
- // 走更新逻辑
111
- getWidths(measureRowElementRef.current) :
112
- // 当列数变化时重新走初始化逻辑
113
- index.getGroupItemWidth(columns);
114
- });
107
+ setColWidths(index.getGroupItemWidth(columns));
108
+ // setColWidths((prev) => {
109
+ // // resizable 模式下通过 measureRowElementRef.current 去更新列宽,防止拖拽后宽度被重置
110
+ // // 例如同时设置了 resizable 和 rowSelection,当拖拽某列宽度后再选中某行时,该列宽度会被重置
111
+ // return resizable && measureRowElementRef.current?.childNodes.length === prev.length
112
+ // ? // 走更新逻辑
113
+ // getWidths(measureRowElementRef.current)
114
+ // : // 当列数变化时重新走初始化逻辑
115
+ // getGroupItemWidth(columns)
116
+ // })
115
117
  }, [columns]);
116
118
  /**
117
119
  * 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
@@ -78,6 +78,7 @@ var useTable = function useTable(_a) {
78
78
  stickyTop = _a$stickyTop === void 0 ? 0 : _a$stickyTop,
79
79
  _a$draggable = _a.draggable,
80
80
  draggable = _a$draggable === void 0 ? false : _a$draggable,
81
+ onDragStart = _a.onDragStart,
81
82
  onDropProp = _a.onDrop,
82
83
  onDropEnd = _a.onDropEnd,
83
84
  showColMenu = _a.showColMenu,
@@ -574,6 +575,7 @@ var useTable = function useTable(_a) {
574
575
  draggable: draggable,
575
576
  highlightColumns: [],
576
577
  dragRowRef: dragRowRef,
578
+ onDragStart: onDragStart,
577
579
  onDrop: onDrop,
578
580
  groupedColumns: groupedColumns,
579
581
  // 子树展开
@@ -26,6 +26,7 @@ import { useEmbedExpand } from './hooks/use-embed-expand.js';
26
26
  import { TheadContent } from './TheadContent.js';
27
27
  import { ColGroupContent } from './ColGroupContent.js';
28
28
  import { TbodyContent } from './TbodyContent.js';
29
+ import { SELECTION_DATA_KEY } from './Table.js';
29
30
  var _role = 'table';
30
31
  var _prefix = getPrefixCls('table');
31
32
  var EMBED_DATA_KEY = "TABLE_EMBED_DATA_KEY_" + uuid();
@@ -125,7 +126,8 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
125
126
  };
126
127
  var hasAvgColumn = false;
127
128
  columns.forEach(function (column, index) {
128
- if (index === 0) {
129
+ // 行选中模式下,index=0是checkbox列,index=1才是第一列 ; fix issue: https://github.com/XiaoMi/hiui/issues/2863
130
+ if (index === 0 || index === 1 && columns[0].dataKey === SELECTION_DATA_KEY) {
129
131
  // @ts-ignore
130
132
  avgRow.raw[column.dataKey] = i18n.get('table.average');
131
133
  }
@@ -153,7 +155,7 @@ var BaseTable = /*#__PURE__*/forwardRef(function (_a, ref) {
153
155
  };
154
156
  var hasSumColumn = false;
155
157
  columns.forEach(function (column, index) {
156
- if (index === 0) {
158
+ if (index === 0 || index === 1 && columns[0].dataKey === SELECTION_DATA_KEY) {
157
159
  // @ts-ignore
158
160
  sumRow.raw[column.dataKey] = i18n.get('table.total');
159
161
  }
@@ -7,7 +7,7 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- import React__default, { forwardRef, useMemo } from 'react';
10
+ import React__default, { forwardRef, useRef, useMemo } from 'react';
11
11
  import List from './node_modules/rc-virtual-list/es/List.js';
12
12
  import { getPrefixCls, cx } from '@hi-ui/classname';
13
13
  import { __DEV__ } from '@hi-ui/env';
@@ -20,7 +20,7 @@ import { ColGroupContent } from './ColGroupContent.js';
20
20
  import { renderEmptyContent, TbodyContent } from './TbodyContent.js';
21
21
  var _role = 'table';
22
22
  var _prefix = getPrefixCls(_role);
23
- var TableBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
+ var TableBody = /*#__PURE__*/forwardRef(function (_ref) {
24
24
  var _ref$prefixCls = _ref.prefixCls,
25
25
  prefixCls = _ref$prefixCls === void 0 ? _prefix : _ref$prefixCls,
26
26
  emptyContent = _ref.emptyContent;
@@ -41,6 +41,7 @@ var TableBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
41
41
  measureRowElementRef = _useTableContext.measureRowElementRef,
42
42
  scrollbar = _useTableContext.scrollbar,
43
43
  scrollLeft = _useTableContext.scrollLeft;
44
+ var virtualListRef = useRef(null);
44
45
  var cls = cx(prefixCls + "-body");
45
46
  var getRequiredProps = useLatestCallback(function (id) {
46
47
  return {
@@ -63,8 +64,9 @@ var TableBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
63
64
  }, [colWidths]);
64
65
  if (virtual) {
65
66
  // TODO: avg和summay row的逻辑
66
- var realHeight = (_a = scrollBodyElementRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
67
- var vMaxHeight = maxHeight ? !isNaN(Number(String(maxHeight).replace(/px/, ''))) ? Number(maxHeight) : realHeight : 300;
67
+ var realHeight = (_a = virtualListRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height;
68
+ var maxHeightNumStr = String(maxHeight).replace(/px$/, '');
69
+ var vMaxHeight = maxHeight ? !isNaN(Number(maxHeightNumStr)) ? Number(maxHeightNumStr) : realHeight : 300;
68
70
  return /*#__PURE__*/React__default.createElement("div", {
69
71
  ref: scrollBodyElementRef,
70
72
  className: cls,
@@ -91,10 +93,12 @@ var TableBody = /*#__PURE__*/forwardRef(function (_ref, ref) {
91
93
  width: rowWidth
92
94
  }
93
95
  }), isArrayNonEmpty(transitionData) ? ( /*#__PURE__*/React__default.createElement("div", {
96
+ ref: virtualListRef,
94
97
  style: {
95
98
  width: '100%',
96
99
  position: 'sticky',
97
- left: 0
100
+ left: 0,
101
+ maxHeight: maxHeight
98
102
  }
99
103
  }, /*#__PURE__*/React__default.createElement(List, {
100
104
  prefixCls: cls + "--virtual",
@@ -92,14 +92,16 @@ var useColWidth = function useColWidth(_ref) {
92
92
  }
93
93
  }, [getVirtualWidths, virtual]);
94
94
  useUpdateEffect(function () {
95
- setColWidths(function (prev) {
96
- var _a;
97
- return ((_a = measureRowElementRef.current) === null || _a === void 0 ? void 0 : _a.childNodes.length) === prev.length ?
98
- // 走更新逻辑
99
- getWidths(measureRowElementRef.current) :
100
- // 当列数变化时重新走初始化逻辑
101
- getGroupItemWidth(columns);
102
- });
95
+ setColWidths(getGroupItemWidth(columns));
96
+ // setColWidths((prev) => {
97
+ // // resizable 模式下通过 measureRowElementRef.current 去更新列宽,防止拖拽后宽度被重置
98
+ // // 例如同时设置了 resizable 和 rowSelection,当拖拽某列宽度后再选中某行时,该列宽度会被重置
99
+ // return resizable && measureRowElementRef.current?.childNodes.length === prev.length
100
+ // ? // 走更新逻辑
101
+ // getWidths(measureRowElementRef.current)
102
+ // : // 当列数变化时重新走初始化逻辑
103
+ // getGroupItemWidth(columns)
104
+ // })
103
105
  }, [columns]);
104
106
  /**
105
107
  * 根据实际内容区(table 的第一行)渲染,再次精确收集并设置每列宽度
@@ -66,6 +66,7 @@ var useTable = function useTable(_a) {
66
66
  stickyTop = _a$stickyTop === void 0 ? 0 : _a$stickyTop,
67
67
  _a$draggable = _a.draggable,
68
68
  draggable = _a$draggable === void 0 ? false : _a$draggable,
69
+ onDragStart = _a.onDragStart,
69
70
  onDropProp = _a.onDrop,
70
71
  onDropEnd = _a.onDropEnd,
71
72
  showColMenu = _a.showColMenu,
@@ -562,6 +563,7 @@ var useTable = function useTable(_a) {
562
563
  draggable: draggable,
563
564
  highlightColumns: [],
564
565
  dragRowRef: dragRowRef,
566
+ onDragStart: onDragStart,
565
567
  onDrop: onDrop,
566
568
  groupedColumns: groupedColumns,
567
569
  // 子树展开
@@ -26,6 +26,9 @@ export declare const TableProvider: import("react").Provider<(Omit<{
26
26
  draggable: boolean;
27
27
  highlightColumns: any;
28
28
  dragRowRef: import("react").MutableRefObject<any>;
29
+ onDragStart: ((evt: import("react").DragEvent<Element>, option: {
30
+ dragNode: object;
31
+ }) => void) | undefined;
29
32
  onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
30
33
  groupedColumns: import("./types").FlattedTableColumnItemData[][];
31
34
  onExpandTreeRowsChange: (expandedNode: import("./types").TableRowEventData, shouldExpanded: boolean) => void;
@@ -138,6 +141,9 @@ export declare const useTableContext: () => Omit<{
138
141
  draggable: boolean;
139
142
  highlightColumns: any;
140
143
  dragRowRef: import("react").MutableRefObject<any>;
144
+ onDragStart: ((evt: import("react").DragEvent<Element>, option: {
145
+ dragNode: object;
146
+ }) => void) | undefined;
141
147
  onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
142
148
  groupedColumns: import("./types").FlattedTableColumnItemData[][];
143
149
  onExpandTreeRowsChange: (expandedNode: import("./types").TableRowEventData, shouldExpanded: boolean) => void;
@@ -28,6 +28,9 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
28
28
  draggable: boolean;
29
29
  highlightColumns: any;
30
30
  dragRowRef: React.MutableRefObject<any>;
31
+ onDragStart: ((evt: React.DragEvent, option: {
32
+ dragNode: object;
33
+ }) => void) | undefined;
31
34
  onDrop: (evt: any, sourceId: any, targetId: any, dragDirection: any) => void;
32
35
  groupedColumns: FlattedTableColumnItemData[][];
33
36
  onExpandTreeRowsChange: (expandedNode: TableRowEventData, shouldExpanded: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/table",
3
- "version": "4.5.4",
3
+ "version": "4.5.6-alpha.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
@@ -56,7 +56,7 @@
56
56
  "@hi-ui/icons": "^4.0.19",
57
57
  "@hi-ui/loading": "^4.2.1",
58
58
  "@hi-ui/object-utils": "^4.0.4",
59
- "@hi-ui/pagination": "^4.0.15",
59
+ "@hi-ui/pagination": "^4.0.16",
60
60
  "@hi-ui/popper": "^4.1.5",
61
61
  "@hi-ui/react-utils": "^4.0.4",
62
62
  "@hi-ui/scrollbar": "^4.1.1",
package/CHANGELOG.md DELETED
@@ -1,315 +0,0 @@
1
- # @hi-ui/table
2
-
3
- ## 4.5.4
4
-
5
- ### Patch Changes
6
-
7
- - [#2839](https://github.com/XiaoMi/hiui/pull/2839) [`e8498f36e`](https://github.com/XiaoMi/hiui/commit/e8498f36efe4dd42e0ef26c2e4c60298e2ce0147) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 columns 中将 title 设置为空字符串报错
8
-
9
- - [#2840](https://github.com/XiaoMi/hiui/pull/2840) [`c2afbaf33`](https://github.com/XiaoMi/hiui/commit/c2afbaf337dc933aa3858187e0010255ee2b82d5) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复同时设置 fieldKey 和 rowSelection 时 onChange 回调参数异常问题
10
-
11
- - Updated dependencies [[`3afbf239e`](https://github.com/XiaoMi/hiui/commit/3afbf239e816ede48d6a85cbd99b6b099b8c8eb3), [`613c15a41`](https://github.com/XiaoMi/hiui/commit/613c15a41d783b86d86ccfb1dccd4da897e5ba9c), [`5d531802b`](https://github.com/XiaoMi/hiui/commit/5d531802ba9b142d448a2de2a7a8315722be0af8)]:
12
- - @hi-ui/env@4.0.7
13
- - @hi-ui/select@4.4.2
14
-
15
- ## 4.5.3
16
-
17
- ### Patch Changes
18
-
19
- - [#2817](https://github.com/XiaoMi/hiui/pull/2817) [`c32ae3dd9`](https://github.com/XiaoMi/hiui/commit/c32ae3dd9b5a89840270649fc397d474e9e1de4b) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复表头分组单元格边框显示问题
20
-
21
- ## 4.5.2
22
-
23
- ### Patch Changes
24
-
25
- - [#2791](https://github.com/XiaoMi/hiui/pull/2791) [`1a00f9fc4`](https://github.com/XiaoMi/hiui/commit/1a00f9fc4a44619059d7852e846b54fedbd56715) Thanks [@zyprepare](https://github.com/zyprepare)! - build: style-inject(node 环境下有问题) 替换为 @hi-ui/style-inject
26
-
27
- - [#2790](https://github.com/XiaoMi/hiui/pull/2790) [`86a096b03`](https://github.com/XiaoMi/hiui/commit/86a096b031e42622714c4147ea99d2867baddfda) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复全选时 onChange 第 4 个参数返回 undefined 问题
28
-
29
- - Updated dependencies [[`1a00f9fc4`](https://github.com/XiaoMi/hiui/commit/1a00f9fc4a44619059d7852e846b54fedbd56715)]:
30
- - @hi-ui/env@4.0.5
31
- - @hi-ui/icons@4.0.19
32
- - @hi-ui/button@4.0.10
33
- - @hi-ui/checkbox@4.0.10
34
- - @hi-ui/drawer@4.1.4
35
- - @hi-ui/empty-state@4.1.1
36
- - @hi-ui/icon-button@4.0.9
37
- - @hi-ui/loading@4.2.1
38
- - @hi-ui/pagination@4.0.15
39
- - @hi-ui/popper@4.1.5
40
- - @hi-ui/scrollbar@4.1.1
41
- - @hi-ui/select@4.4.1
42
- - @hi-ui/spinner@4.0.9
43
- - @hi-ui/array-utils@4.0.5
44
- - @hi-ui/classname@4.0.5
45
-
46
- ## 4.5.1
47
-
48
- ### Patch Changes
49
-
50
- - [#2760](https://github.com/XiaoMi/hiui/pull/2760) [`68afb78ed`](https://github.com/XiaoMi/hiui/commit/68afb78ed1fb8e42bc8eec68cfa5f1787ee052b0) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 Safari 中设置 virtual 后只能表头滚动问题
51
-
52
- - [#2759](https://github.com/XiaoMi/hiui/pull/2759) [`7437ca3b0`](https://github.com/XiaoMi/hiui/commit/7437ca3b07ce1fb66fe9fa3572b45c2928e64a73) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 SettingDrawer 列更新问题
53
-
54
- ## 4.5.0
55
-
56
- ### Minor Changes
57
-
58
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`a2b9df50b`](https://github.com/XiaoMi/hiui/commit/a2b9df50b454ae033a5dd0e5f6165ab2f6de07a5) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 设置 rowSelection 后默认冻结该列
59
-
60
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`81863f522`](https://github.com/XiaoMi/hiui/commit/81863f52200213ae7740f496c4fe8d73f607b66c) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: setting 增加 trigger 配置
61
-
62
- ### Patch Changes
63
-
64
- - [#2726](https://github.com/XiaoMi/hiui/pull/2726) [`459c7940c`](https://github.com/XiaoMi/hiui/commit/459c7940cc94b124e182754474424e13de9f120a) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复双表格结构下,无法设置空状态内容问题
65
-
66
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`6ac546d3e`](https://github.com/XiaoMi/hiui/commit/6ac546d3e9c1b863fb30941dd365220fa138258a) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复虚拟表格设置 maxHeight 底部内容被遮挡问题
67
-
68
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`b971c0b06`](https://github.com/XiaoMi/hiui/commit/b971c0b06b1c64dd72c79c23068c4fed684d97c3) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复同时设置 bordered 和 scrollbar 后滚动异常问题
69
-
70
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`a2b9df50b`](https://github.com/XiaoMi/hiui/commit/a2b9df50b454ae033a5dd0e5f6165ab2f6de07a5) Thanks [@zyprepare](https://github.com/zyprepare)! - feat(table): 设置 rowSelection 后默认冻结该列
71
-
72
- - [#2748](https://github.com/XiaoMi/hiui/pull/2748) [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复表头分组超过 2 列时冻结列交互异常问题
73
-
74
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`528314e46`](https://github.com/XiaoMi/hiui/commit/528314e46173dd18cc0140e60e763cb84b52fa2c) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复设置 dataSource 组件首次会执行 2 次请求问题
75
-
76
- - [#2747](https://github.com/XiaoMi/hiui/pull/2747) [`b5654408e`](https://github.com/XiaoMi/hiui/commit/b5654408ee33b6448b6e9f1297a2790a486d753f) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 监听列变化,更新列最小可调整宽度
77
-
78
- - Updated dependencies [[`a9b9c93fc`](https://github.com/XiaoMi/hiui/commit/a9b9c93fc3a3fea60d14052a5afeef9daf7efa1b), [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56)]:
79
- - @hi-ui/select@4.3.0
80
- - @hi-ui/tree-utils@4.1.6
81
-
82
- ## 4.4.1
83
-
84
- ### Patch Changes
85
-
86
- - [#2722](https://github.com/XiaoMi/hiui/pull/2722) [`a25261a88`](https://github.com/XiaoMi/hiui/commit/a25261a884f9b3470924c29564b3c4758ebab6cf) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复空状态下横向滚动条问题
87
-
88
- - Updated dependencies [[`a25261a88`](https://github.com/XiaoMi/hiui/commit/a25261a884f9b3470924c29564b3c4758ebab6cf)]:
89
- - @hi-ui/checkbox@4.0.9
90
-
91
- ## 4.4.0
92
-
93
- ### Minor Changes
94
-
95
- - [#2699](https://github.com/XiaoMi/hiui/pull/2699) [`6c5d9c7ed`](https://github.com/XiaoMi/hiui/commit/6c5d9c7ed21eaebc26638ba6ee54eb3bfe918af4) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: add fixed and rowClassName api
96
- feat: SettingDrawer 增加 extraHeader showCheckAll itemRender api
97
- fix: 修复边框模式下样式问题
98
- feat: SettingDrawer 支持配置列是否禁止拖拽
99
- fix: 修复 resize 模式下多选时宽度被重置问题
100
- fix: 修复树形表格节点图标没有对齐问题
101
- fix: 修复虚拟表格边框样式问题
102
- fix: 修复虚拟表格下双滚动条问题
103
- fix: 修复虚拟表格下 size 和 maxHeight 失效问题
104
-
105
- ### Patch Changes
106
-
107
- - Updated dependencies [[`4ec059bad`](https://github.com/XiaoMi/hiui/commit/4ec059badc67f3facc98288f3e7a67f51938e40f), [`ffd47b89a`](https://github.com/XiaoMi/hiui/commit/ffd47b89a5d7da54ea717fa827123e9c3b2b6d0f), [`cfc37dc37`](https://github.com/XiaoMi/hiui/commit/cfc37dc37c83ce737d88262644c07ca23cde0731), [`2fa5ee5b6`](https://github.com/XiaoMi/hiui/commit/2fa5ee5b6ecc7f95a5224fd91ccfcd263b41d932), [`9cf8e079f`](https://github.com/XiaoMi/hiui/commit/9cf8e079fd3f342d851d7abfecc1c0447c3ac40b)]:
108
- - @hi-ui/loading@4.2.0
109
- - @hi-ui/empty-state@4.1.0
110
- - @hi-ui/tree-utils@4.1.5
111
- - @hi-ui/scrollbar@4.1.0
112
-
113
- ## 4.3.4
114
-
115
- ### Patch Changes
116
-
117
- - build: rollup2 构建
118
- - Updated dependencies
119
- - @hi-ui/core@4.0.8
120
- - @hi-ui/use-cache@4.0.4
121
- - @hi-ui/use-check@4.0.5
122
- - @hi-ui/use-check-state@4.0.4
123
- - @hi-ui/use-drag-sorter@4.0.4
124
- - @hi-ui/use-latest@4.0.4
125
- - @hi-ui/use-toggle@4.0.4
126
- - @hi-ui/use-uncontrolled-state@4.0.4
127
- - @hi-ui/use-update-effect@4.0.4
128
- - @hi-ui/icons@4.0.18
129
- - @hi-ui/button@4.0.9
130
- - @hi-ui/checkbox@4.0.8
131
- - @hi-ui/drawer@4.1.3
132
- - @hi-ui/empty-state@4.0.7
133
- - @hi-ui/icon-button@4.0.8
134
- - @hi-ui/loading@4.1.3
135
- - @hi-ui/pagination@4.0.14
136
- - @hi-ui/popper@4.1.3
137
- - @hi-ui/select@4.2.5
138
- - @hi-ui/spinner@4.0.8
139
- - @hi-ui/array-utils@4.0.4
140
- - @hi-ui/classname@4.0.4
141
- - @hi-ui/dom-utils@4.0.7
142
- - @hi-ui/env@4.0.4
143
- - @hi-ui/func-utils@4.0.4
144
- - @hi-ui/object-utils@4.0.4
145
- - @hi-ui/react-utils@4.0.4
146
- - @hi-ui/times@4.0.4
147
- - @hi-ui/tree-utils@4.1.4
148
- - @hi-ui/type-assertion@4.0.4
149
-
150
- ## 4.3.3
151
-
152
- ### Patch Changes
153
-
154
- - fix: 修复 rollup3 打包 cjs 模块问题
155
- - Updated dependencies
156
- - @hi-ui/env@4.0.3
157
- - @hi-ui/core@4.0.7
158
- - @hi-ui/use-cache@4.0.3
159
- - @hi-ui/use-check@4.0.4
160
- - @hi-ui/use-check-state@4.0.3
161
- - @hi-ui/use-drag-sorter@4.0.3
162
- - @hi-ui/use-latest@4.0.3
163
- - @hi-ui/use-toggle@4.0.3
164
- - @hi-ui/use-uncontrolled-state@4.0.3
165
- - @hi-ui/use-update-effect@4.0.3
166
- - @hi-ui/icons@4.0.17
167
- - @hi-ui/button@4.0.8
168
- - @hi-ui/checkbox@4.0.7
169
- - @hi-ui/drawer@4.1.2
170
- - @hi-ui/empty-state@4.0.6
171
- - @hi-ui/icon-button@4.0.7
172
- - @hi-ui/loading@4.1.2
173
- - @hi-ui/pagination@4.0.13
174
- - @hi-ui/popper@4.1.2
175
- - @hi-ui/select@4.2.4
176
- - @hi-ui/spinner@4.0.7
177
- - @hi-ui/array-utils@4.0.3
178
- - @hi-ui/classname@4.0.3
179
- - @hi-ui/dom-utils@4.0.6
180
- - @hi-ui/func-utils@4.0.3
181
- - @hi-ui/object-utils@4.0.3
182
- - @hi-ui/react-utils@4.0.3
183
- - @hi-ui/times@4.0.3
184
- - @hi-ui/tree-utils@4.1.3
185
- - @hi-ui/type-assertion@4.0.3
186
-
187
- ## 4.3.2
188
-
189
- ### Patch Changes
190
-
191
- - [#2672](https://github.com/XiaoMi/hiui/pull/2672) [`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e) Thanks [@zyprepare](https://github.com/zyprepare)! - build: 升级到 rollup3,重新构建发布组件
192
-
193
- - [#2671](https://github.com/XiaoMi/hiui/pull/2671) [`6d7909444`](https://github.com/XiaoMi/hiui/commit/6d790944418f36689b34805f858a1268530864b9) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复组件参数类型错误
194
-
195
- - Updated dependencies [[`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e)]:
196
- - @hi-ui/core@4.0.6
197
- - @hi-ui/use-cache@4.0.2
198
- - @hi-ui/use-check@4.0.3
199
- - @hi-ui/use-check-state@4.0.2
200
- - @hi-ui/use-drag-sorter@4.0.2
201
- - @hi-ui/use-latest@4.0.2
202
- - @hi-ui/use-toggle@4.0.2
203
- - @hi-ui/use-uncontrolled-state@4.0.2
204
- - @hi-ui/use-update-effect@4.0.2
205
- - @hi-ui/icons@4.0.16
206
- - @hi-ui/button@4.0.7
207
- - @hi-ui/checkbox@4.0.6
208
- - @hi-ui/drawer@4.1.1
209
- - @hi-ui/empty-state@4.0.5
210
- - @hi-ui/icon-button@4.0.6
211
- - @hi-ui/loading@4.1.1
212
- - @hi-ui/pagination@4.0.12
213
- - @hi-ui/popper@4.1.1
214
- - @hi-ui/select@4.2.3
215
- - @hi-ui/spinner@4.0.6
216
- - @hi-ui/array-utils@4.0.2
217
- - @hi-ui/classname@4.0.2
218
- - @hi-ui/dom-utils@4.0.5
219
- - @hi-ui/env@4.0.2
220
- - @hi-ui/func-utils@4.0.2
221
- - @hi-ui/object-utils@4.0.2
222
- - @hi-ui/react-utils@4.0.2
223
- - @hi-ui/times@4.0.2
224
- - @hi-ui/tree-utils@4.1.2
225
- - @hi-ui/type-assertion@4.0.2
226
-
227
- ## 4.3.1
228
-
229
- ### Patch Changes
230
-
231
- - [#2654](https://github.com/XiaoMi/hiui/pull/2654) [`dc002a32a`](https://github.com/XiaoMi/hiui/commit/dc002a32a2c6f538b0df37c63d34f603647d9b70) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加 scrollbar 参数,用于在 Windows 环境下优化滚动条样式
232
-
233
- - Updated dependencies [[`b477d91db`](https://github.com/XiaoMi/hiui/commit/b477d91db15bbc92c8712a9a771af5b332779315)]:
234
- - @hi-ui/button@4.0.6
235
- - @hi-ui/icon-button@4.0.5
236
- - @hi-ui/pagination@4.0.11
237
-
238
- ## 4.3.0
239
-
240
- ### Minor Changes
241
-
242
- - [#2642](https://github.com/XiaoMi/hiui/pull/2642) [`74d8c5148`](https://github.com/XiaoMi/hiui/commit/74d8c51489ae7a88c90b1426e9da118125579b97) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 将之前的双表格结构优化成单表格,冻结列和表头吸顶等场景依然采用双表格结构
243
-
244
- - [#2647](https://github.com/XiaoMi/hiui/pull/2647) [`8767c9470`](https://github.com/XiaoMi/hiui/commit/8767c94702fdc697207001f639508907e20fc6a5) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: add footerRender api
245
-
246
- ### Patch Changes
247
-
248
- - [#2648](https://github.com/XiaoMi/hiui/pull/2648) [`54387a81e`](https://github.com/XiaoMi/hiui/commit/54387a81e1c6add77e791af8d849a6518077afd5) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 优化 resizable 模式下可调整的最小宽度
249
-
250
- - Updated dependencies [[`4f7c8c906`](https://github.com/XiaoMi/hiui/commit/4f7c8c9063d9b72068a2db5fa614eed130aafd0f)]:
251
- - @hi-ui/select@4.2.2
252
-
253
- ## 4.2.0
254
-
255
- ### Minor Changes
256
-
257
- - [#2597](https://github.com/XiaoMi/hiui/pull/2597) [`0ddf24960`](https://github.com/XiaoMi/hiui/commit/0ddf24960194fdd15653e34e0a6cef54b1586748) Thanks [@zyprepare](https://github.com/zyprepare)! - chore: axios 升级为 1.5.0
258
-
259
- ### Patch Changes
260
-
261
- - [#2608](https://github.com/XiaoMi/hiui/pull/2608) [`fb9b1281d`](https://github.com/XiaoMi/hiui/commit/fb9b1281d99ba0d21b5cb32c87b5e671272c1c8e) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复紧凑模式下多选项间距问题
262
-
263
- - Updated dependencies [[`b3b36813a`](https://github.com/XiaoMi/hiui/commit/b3b36813a6968c5c96c39d1100935372e3aa5b4d)]:
264
- - @hi-ui/select@4.2.0
265
-
266
- ## 4.1.2
267
-
268
- ### Patch Changes
269
-
270
- - [#2572](https://github.com/XiaoMi/hiui/pull/2572) [`eee5e6d16`](https://github.com/XiaoMi/hiui/commit/eee5e6d1658685a6119b5aa40038c572145b3b4e) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 表格性能优化
271
-
272
- - Updated dependencies [[`937052db3`](https://github.com/XiaoMi/hiui/commit/937052db36ecfa50fef53df13d159bee0d08fa41), [`ccb1eec12`](https://github.com/XiaoMi/hiui/commit/ccb1eec122a33466536b365d443f175d1e16dc86), [`eee5e6d16`](https://github.com/XiaoMi/hiui/commit/eee5e6d1658685a6119b5aa40038c572145b3b4e)]:
273
- - @hi-ui/icons@4.0.14
274
- - @hi-ui/popper@4.1.0
275
- - @hi-ui/tree-utils@4.1.1
276
-
277
- ## 4.1.1
278
-
279
- ### Patch Changes
280
-
281
- - [#2557](https://github.com/XiaoMi/hiui/pull/2557) [`ef7aae038`](https://github.com/XiaoMi/hiui/commit/ef7aae038362d3a7700611737c474c29d1ba07b4) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: maxHeight 支持表达式
282
-
283
- - [#2558](https://github.com/XiaoMi/hiui/pull/2558) [`bdd913d71`](https://github.com/XiaoMi/hiui/commit/bdd913d7173de64952437014ab9ffd1947ed506c) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加树形结构排序
284
-
285
- - Updated dependencies [[`bdd913d71`](https://github.com/XiaoMi/hiui/commit/bdd913d7173de64952437014ab9ffd1947ed506c)]:
286
- - @hi-ui/tree-utils@4.1.0
287
-
288
- ## 4.1.0
289
-
290
- ### Minor Changes
291
-
292
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: rowSelection onChange 回调增加已选数据集合参数
293
-
294
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加虚拟滚动功能
295
-
296
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加 dataSource 功能
297
-
298
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 列设置增加 checkDisabledColKeys api,用于禁用列选择操作
299
-
300
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: add SettingDrawer component
301
-
302
- ### Patch Changes
303
-
304
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 数据排序样式不对
305
-
306
- - [#2473](https://github.com/XiaoMi/hiui/pull/2473) [`3d5f9ba15`](https://github.com/XiaoMi/hiui/commit/3d5f9ba15868ccdc385cdcdc8a3bbe2e55542b39) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复 sonarcloud 扫描的 Bugs
307
-
308
- - Updated dependencies [[`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1)]:
309
- - @hi-ui/loading@4.1.0
310
-
311
- ## 4.0.13
312
-
313
- ### Patch Changes
314
-
315
- - [#2315](https://github.com/XiaoMi/hiui/pull/2315) [`551ab0b73`](https://github.com/XiaoMi/hiui/commit/551ab0b734e00d1e0ca170c9a87f316aa4197762) Thanks [@zyprepare](https://github.com/zyprepare)! - 修复设置 size 后,空状态会出现滚动条问题