@itwin/itwinui-react 2.4.3 → 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,11 @@
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
+
3
9
  ## 2.4.3
4
10
 
5
11
  ### 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.flatHeaders.map((x) => x.id);
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) {
@@ -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.flatHeaders.map((x) => x.id);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "cjs/index.js",