@itwin/itwinui-react 2.4.2 → 2.4.4
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
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8313002f: Fixed bug which gave an unexpected column order once columns were hidden, reordered, and then shown
|
|
8
|
+
|
|
9
|
+
## 2.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- a987bc92: Fixed issue with `Table` autoscroll not completely showing a given row.
|
|
14
|
+
|
|
3
15
|
## 2.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -54,7 +54,7 @@ const defaultGetDragAndDropProps = (isEnabled) => (props, { instance, header, })
|
|
|
54
54
|
const onDrop = (event) => {
|
|
55
55
|
event.preventDefault();
|
|
56
56
|
setOnDragColumnStyle(event);
|
|
57
|
-
const columnIds = instance.
|
|
57
|
+
const columnIds = instance.allColumns.map((x) => x.id);
|
|
58
58
|
const srcIndex = instance.state.columnReorderStartIndex;
|
|
59
59
|
const dstIndex = columnIds.findIndex((x) => x === header.id);
|
|
60
60
|
if (srcIndex === dstIndex || srcIndex === -1 || dstIndex === -1) {
|
|
@@ -263,6 +263,10 @@ const useVirtualization = (props) => {
|
|
|
263
263
|
indexDiff * childHeight.current.middle
|
|
264
264
|
: scrollToIndex * childHeight.current.middle,
|
|
265
265
|
});
|
|
266
|
+
// update visible index
|
|
267
|
+
const start = getNumberOfNodesInHeight(childHeight.current.middle, Math.round(scrollableContainer.scrollTop));
|
|
268
|
+
const visibleNodes = getVisibleNodeCount(childHeight.current.middle, start, itemsLength, scrollableContainer);
|
|
269
|
+
visibleIndex.current = { start: start, end: start + visibleNodes };
|
|
266
270
|
}
|
|
267
271
|
// if `scrollToIndex` is the first visible node
|
|
268
272
|
// ensure it is fully visible
|
|
@@ -50,7 +50,7 @@ const defaultGetDragAndDropProps = (isEnabled) => (props, { instance, header, })
|
|
|
50
50
|
const onDrop = (event) => {
|
|
51
51
|
event.preventDefault();
|
|
52
52
|
setOnDragColumnStyle(event);
|
|
53
|
-
const columnIds = instance.
|
|
53
|
+
const columnIds = instance.allColumns.map((x) => x.id);
|
|
54
54
|
const srcIndex = instance.state.columnReorderStartIndex;
|
|
55
55
|
const dstIndex = columnIds.findIndex((x) => x === header.id);
|
|
56
56
|
if (srcIndex === dstIndex || srcIndex === -1 || dstIndex === -1) {
|
|
@@ -234,6 +234,10 @@ export const useVirtualization = (props) => {
|
|
|
234
234
|
indexDiff * childHeight.current.middle
|
|
235
235
|
: scrollToIndex * childHeight.current.middle,
|
|
236
236
|
});
|
|
237
|
+
// update visible index
|
|
238
|
+
const start = getNumberOfNodesInHeight(childHeight.current.middle, Math.round(scrollableContainer.scrollTop));
|
|
239
|
+
const visibleNodes = getVisibleNodeCount(childHeight.current.middle, start, itemsLength, scrollableContainer);
|
|
240
|
+
visibleIndex.current = { start: start, end: start + visibleNodes };
|
|
237
241
|
}
|
|
238
242
|
// if `scrollToIndex` is the first visible node
|
|
239
243
|
// ensure it is fully visible
|