@hi-ui/table 4.5.0 → 4.5.1-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.
@@ -62,6 +62,9 @@ var useColSorter = function useColSorter(_ref) {
62
62
  var _useState = React.useState(sortedCols),
63
63
  _cacheSortedCols = _useState[0],
64
64
  setCacheSortedCols = _useState[1];
65
+ React.useEffect(function () {
66
+ setCacheSortedCols(sortedCols);
67
+ }, [sortedCols]);
65
68
  // 保证排序的 column,是有效的可展示的列
66
69
  var cacheSortedCols = React.useMemo(function () {
67
70
  return _cacheSortedCols.filter(function (col) {
@@ -57,6 +57,9 @@ var useColSorter = function useColSorter(_ref) {
57
57
  var _useState = useState(sortedCols),
58
58
  _cacheSortedCols = _useState[0],
59
59
  setCacheSortedCols = _useState[1];
60
+ useEffect(function () {
61
+ setCacheSortedCols(sortedCols);
62
+ }, [sortedCols]);
60
63
  // 保证排序的 column,是有效的可展示的列
61
64
  var cacheSortedCols = useMemo(function () {
62
65
  return _cacheSortedCols.filter(function (col) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hi-ui/table",
3
- "version": "4.5.0",
3
+ "version": "4.5.1-alpha.0",
4
4
  "description": "A sub-package for @hi-ui/hiui.",
5
5
  "keywords": [],
6
6
  "author": "HiUI <mi-hiui@xiaomi.com>",
package/CHANGELOG.md DELETED
@@ -1,264 +0,0 @@
1
- # @hi-ui/table
2
-
3
- ## 4.5.0
4
-
5
- ### Minor Changes
6
-
7
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`a2b9df50b`](https://github.com/XiaoMi/hiui/commit/a2b9df50b454ae033a5dd0e5f6165ab2f6de07a5) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 设置 rowSelection 后默认冻结该列
8
-
9
- - [#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 配置
10
-
11
- ### Patch Changes
12
-
13
- - [#2726](https://github.com/XiaoMi/hiui/pull/2726) [`459c7940c`](https://github.com/XiaoMi/hiui/commit/459c7940cc94b124e182754474424e13de9f120a) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复双表格结构下,无法设置空状态内容问题
14
-
15
- - [#2735](https://github.com/XiaoMi/hiui/pull/2735) [`6ac546d3e`](https://github.com/XiaoMi/hiui/commit/6ac546d3e9c1b863fb30941dd365220fa138258a) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复虚拟表格设置 maxHeight 底部内容被遮挡问题
16
-
17
- - [#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 后滚动异常问题
18
-
19
- - [#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 后默认冻结该列
20
-
21
- - [#2748](https://github.com/XiaoMi/hiui/pull/2748) [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复表头分组超过 2 列时冻结列交互异常问题
22
-
23
- - [#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 次请求问题
24
-
25
- - [#2747](https://github.com/XiaoMi/hiui/pull/2747) [`b5654408e`](https://github.com/XiaoMi/hiui/commit/b5654408ee33b6448b6e9f1297a2790a486d753f) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 监听列变化,更新列最小可调整宽度
26
-
27
- - Updated dependencies [[`a9b9c93fc`](https://github.com/XiaoMi/hiui/commit/a9b9c93fc3a3fea60d14052a5afeef9daf7efa1b), [`ca008e4ae`](https://github.com/XiaoMi/hiui/commit/ca008e4ae9753bc1f11efcdcbf09121d1ef07b56)]:
28
- - @hi-ui/select@4.3.0
29
- - @hi-ui/tree-utils@4.1.6
30
-
31
- ## 4.4.1
32
-
33
- ### Patch Changes
34
-
35
- - [#2722](https://github.com/XiaoMi/hiui/pull/2722) [`a25261a88`](https://github.com/XiaoMi/hiui/commit/a25261a884f9b3470924c29564b3c4758ebab6cf) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复空状态下横向滚动条问题
36
-
37
- - Updated dependencies [[`a25261a88`](https://github.com/XiaoMi/hiui/commit/a25261a884f9b3470924c29564b3c4758ebab6cf)]:
38
- - @hi-ui/checkbox@4.0.9
39
-
40
- ## 4.4.0
41
-
42
- ### Minor Changes
43
-
44
- - [#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
45
- feat: SettingDrawer 增加 extraHeader showCheckAll itemRender api
46
- fix: 修复边框模式下样式问题
47
- feat: SettingDrawer 支持配置列是否禁止拖拽
48
- fix: 修复 resize 模式下多选时宽度被重置问题
49
- fix: 修复树形表格节点图标没有对齐问题
50
- fix: 修复虚拟表格边框样式问题
51
- fix: 修复虚拟表格下双滚动条问题
52
- fix: 修复虚拟表格下 size 和 maxHeight 失效问题
53
-
54
- ### Patch Changes
55
-
56
- - 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)]:
57
- - @hi-ui/loading@4.2.0
58
- - @hi-ui/empty-state@4.1.0
59
- - @hi-ui/tree-utils@4.1.5
60
- - @hi-ui/scrollbar@4.1.0
61
-
62
- ## 4.3.4
63
-
64
- ### Patch Changes
65
-
66
- - build: rollup2 构建
67
- - Updated dependencies
68
- - @hi-ui/core@4.0.8
69
- - @hi-ui/use-cache@4.0.4
70
- - @hi-ui/use-check@4.0.5
71
- - @hi-ui/use-check-state@4.0.4
72
- - @hi-ui/use-drag-sorter@4.0.4
73
- - @hi-ui/use-latest@4.0.4
74
- - @hi-ui/use-toggle@4.0.4
75
- - @hi-ui/use-uncontrolled-state@4.0.4
76
- - @hi-ui/use-update-effect@4.0.4
77
- - @hi-ui/icons@4.0.18
78
- - @hi-ui/button@4.0.9
79
- - @hi-ui/checkbox@4.0.8
80
- - @hi-ui/drawer@4.1.3
81
- - @hi-ui/empty-state@4.0.7
82
- - @hi-ui/icon-button@4.0.8
83
- - @hi-ui/loading@4.1.3
84
- - @hi-ui/pagination@4.0.14
85
- - @hi-ui/popper@4.1.3
86
- - @hi-ui/select@4.2.5
87
- - @hi-ui/spinner@4.0.8
88
- - @hi-ui/array-utils@4.0.4
89
- - @hi-ui/classname@4.0.4
90
- - @hi-ui/dom-utils@4.0.7
91
- - @hi-ui/env@4.0.4
92
- - @hi-ui/func-utils@4.0.4
93
- - @hi-ui/object-utils@4.0.4
94
- - @hi-ui/react-utils@4.0.4
95
- - @hi-ui/times@4.0.4
96
- - @hi-ui/tree-utils@4.1.4
97
- - @hi-ui/type-assertion@4.0.4
98
-
99
- ## 4.3.3
100
-
101
- ### Patch Changes
102
-
103
- - fix: 修复 rollup3 打包 cjs 模块问题
104
- - Updated dependencies
105
- - @hi-ui/env@4.0.3
106
- - @hi-ui/core@4.0.7
107
- - @hi-ui/use-cache@4.0.3
108
- - @hi-ui/use-check@4.0.4
109
- - @hi-ui/use-check-state@4.0.3
110
- - @hi-ui/use-drag-sorter@4.0.3
111
- - @hi-ui/use-latest@4.0.3
112
- - @hi-ui/use-toggle@4.0.3
113
- - @hi-ui/use-uncontrolled-state@4.0.3
114
- - @hi-ui/use-update-effect@4.0.3
115
- - @hi-ui/icons@4.0.17
116
- - @hi-ui/button@4.0.8
117
- - @hi-ui/checkbox@4.0.7
118
- - @hi-ui/drawer@4.1.2
119
- - @hi-ui/empty-state@4.0.6
120
- - @hi-ui/icon-button@4.0.7
121
- - @hi-ui/loading@4.1.2
122
- - @hi-ui/pagination@4.0.13
123
- - @hi-ui/popper@4.1.2
124
- - @hi-ui/select@4.2.4
125
- - @hi-ui/spinner@4.0.7
126
- - @hi-ui/array-utils@4.0.3
127
- - @hi-ui/classname@4.0.3
128
- - @hi-ui/dom-utils@4.0.6
129
- - @hi-ui/func-utils@4.0.3
130
- - @hi-ui/object-utils@4.0.3
131
- - @hi-ui/react-utils@4.0.3
132
- - @hi-ui/times@4.0.3
133
- - @hi-ui/tree-utils@4.1.3
134
- - @hi-ui/type-assertion@4.0.3
135
-
136
- ## 4.3.2
137
-
138
- ### Patch Changes
139
-
140
- - [#2672](https://github.com/XiaoMi/hiui/pull/2672) [`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e) Thanks [@zyprepare](https://github.com/zyprepare)! - build: 升级到 rollup3,重新构建发布组件
141
-
142
- - [#2671](https://github.com/XiaoMi/hiui/pull/2671) [`6d7909444`](https://github.com/XiaoMi/hiui/commit/6d790944418f36689b34805f858a1268530864b9) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复组件参数类型错误
143
-
144
- - Updated dependencies [[`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e)]:
145
- - @hi-ui/core@4.0.6
146
- - @hi-ui/use-cache@4.0.2
147
- - @hi-ui/use-check@4.0.3
148
- - @hi-ui/use-check-state@4.0.2
149
- - @hi-ui/use-drag-sorter@4.0.2
150
- - @hi-ui/use-latest@4.0.2
151
- - @hi-ui/use-toggle@4.0.2
152
- - @hi-ui/use-uncontrolled-state@4.0.2
153
- - @hi-ui/use-update-effect@4.0.2
154
- - @hi-ui/icons@4.0.16
155
- - @hi-ui/button@4.0.7
156
- - @hi-ui/checkbox@4.0.6
157
- - @hi-ui/drawer@4.1.1
158
- - @hi-ui/empty-state@4.0.5
159
- - @hi-ui/icon-button@4.0.6
160
- - @hi-ui/loading@4.1.1
161
- - @hi-ui/pagination@4.0.12
162
- - @hi-ui/popper@4.1.1
163
- - @hi-ui/select@4.2.3
164
- - @hi-ui/spinner@4.0.6
165
- - @hi-ui/array-utils@4.0.2
166
- - @hi-ui/classname@4.0.2
167
- - @hi-ui/dom-utils@4.0.5
168
- - @hi-ui/env@4.0.2
169
- - @hi-ui/func-utils@4.0.2
170
- - @hi-ui/object-utils@4.0.2
171
- - @hi-ui/react-utils@4.0.2
172
- - @hi-ui/times@4.0.2
173
- - @hi-ui/tree-utils@4.1.2
174
- - @hi-ui/type-assertion@4.0.2
175
-
176
- ## 4.3.1
177
-
178
- ### Patch Changes
179
-
180
- - [#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 环境下优化滚动条样式
181
-
182
- - Updated dependencies [[`b477d91db`](https://github.com/XiaoMi/hiui/commit/b477d91db15bbc92c8712a9a771af5b332779315)]:
183
- - @hi-ui/button@4.0.6
184
- - @hi-ui/icon-button@4.0.5
185
- - @hi-ui/pagination@4.0.11
186
-
187
- ## 4.3.0
188
-
189
- ### Minor Changes
190
-
191
- - [#2642](https://github.com/XiaoMi/hiui/pull/2642) [`74d8c5148`](https://github.com/XiaoMi/hiui/commit/74d8c51489ae7a88c90b1426e9da118125579b97) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 将之前的双表格结构优化成单表格,冻结列和表头吸顶等场景依然采用双表格结构
192
-
193
- - [#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
194
-
195
- ### Patch Changes
196
-
197
- - [#2648](https://github.com/XiaoMi/hiui/pull/2648) [`54387a81e`](https://github.com/XiaoMi/hiui/commit/54387a81e1c6add77e791af8d849a6518077afd5) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 优化 resizable 模式下可调整的最小宽度
198
-
199
- - Updated dependencies [[`4f7c8c906`](https://github.com/XiaoMi/hiui/commit/4f7c8c9063d9b72068a2db5fa614eed130aafd0f)]:
200
- - @hi-ui/select@4.2.2
201
-
202
- ## 4.2.0
203
-
204
- ### Minor Changes
205
-
206
- - [#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
207
-
208
- ### Patch Changes
209
-
210
- - [#2608](https://github.com/XiaoMi/hiui/pull/2608) [`fb9b1281d`](https://github.com/XiaoMi/hiui/commit/fb9b1281d99ba0d21b5cb32c87b5e671272c1c8e) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复紧凑模式下多选项间距问题
211
-
212
- - Updated dependencies [[`b3b36813a`](https://github.com/XiaoMi/hiui/commit/b3b36813a6968c5c96c39d1100935372e3aa5b4d)]:
213
- - @hi-ui/select@4.2.0
214
-
215
- ## 4.1.2
216
-
217
- ### Patch Changes
218
-
219
- - [#2572](https://github.com/XiaoMi/hiui/pull/2572) [`eee5e6d16`](https://github.com/XiaoMi/hiui/commit/eee5e6d1658685a6119b5aa40038c572145b3b4e) Thanks [@zyprepare](https://github.com/zyprepare)! - perf: 表格性能优化
220
-
221
- - 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)]:
222
- - @hi-ui/icons@4.0.14
223
- - @hi-ui/popper@4.1.0
224
- - @hi-ui/tree-utils@4.1.1
225
-
226
- ## 4.1.1
227
-
228
- ### Patch Changes
229
-
230
- - [#2557](https://github.com/XiaoMi/hiui/pull/2557) [`ef7aae038`](https://github.com/XiaoMi/hiui/commit/ef7aae038362d3a7700611737c474c29d1ba07b4) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: maxHeight 支持表达式
231
-
232
- - [#2558](https://github.com/XiaoMi/hiui/pull/2558) [`bdd913d71`](https://github.com/XiaoMi/hiui/commit/bdd913d7173de64952437014ab9ffd1947ed506c) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加树形结构排序
233
-
234
- - Updated dependencies [[`bdd913d71`](https://github.com/XiaoMi/hiui/commit/bdd913d7173de64952437014ab9ffd1947ed506c)]:
235
- - @hi-ui/tree-utils@4.1.0
236
-
237
- ## 4.1.0
238
-
239
- ### Minor Changes
240
-
241
- - [#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 回调增加已选数据集合参数
242
-
243
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加虚拟滚动功能
244
-
245
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: 增加 dataSource 功能
246
-
247
- - [#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,用于禁用列选择操作
248
-
249
- - [#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
250
-
251
- ### Patch Changes
252
-
253
- - [#2474](https://github.com/XiaoMi/hiui/pull/2474) [`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 数据排序样式不对
254
-
255
- - [#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
256
-
257
- - Updated dependencies [[`e95268aa4`](https://github.com/XiaoMi/hiui/commit/e95268aa4af48edaaa9f6afcf5a262342a550cd1)]:
258
- - @hi-ui/loading@4.1.0
259
-
260
- ## 4.0.13
261
-
262
- ### Patch Changes
263
-
264
- - [#2315](https://github.com/XiaoMi/hiui/pull/2315) [`551ab0b73`](https://github.com/XiaoMi/hiui/commit/551ab0b734e00d1e0ca170c9a87f316aa4197762) Thanks [@zyprepare](https://github.com/zyprepare)! - 修复设置 size 后,空状态会出现滚动条问题