@itwin/itwinui-react 2.12.24 → 2.12.25

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.12.25
4
+
5
+ ### Patch Changes
6
+
7
+ - b517fd0c: Fixed a bug in `Table` where `initialState.columnOrder` was not being respected.
8
+
3
9
  ## 2.12.24
4
10
 
5
11
  ### Patch Changes
@@ -298,7 +298,8 @@ const Table = (props) => {
298
298
  // This is to avoid the old columnOrder from affecting the new columns' columnOrder
299
299
  React.useEffect(() => {
300
300
  // Check if columns have changed (by value)
301
- if (JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
301
+ if (lastPassedColumns.current.length > 0 &&
302
+ JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
302
303
  instance.setColumnOrder([]);
303
304
  }
304
305
  lastPassedColumns.current = columns;
@@ -269,7 +269,8 @@ export const Table = (props) => {
269
269
  // This is to avoid the old columnOrder from affecting the new columns' columnOrder
270
270
  React.useEffect(() => {
271
271
  // Check if columns have changed (by value)
272
- if (JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
272
+ if (lastPassedColumns.current.length > 0 &&
273
+ JSON.stringify(lastPassedColumns.current) !== JSON.stringify(columns)) {
273
274
  instance.setColumnOrder([]);
274
275
  }
275
276
  lastPassedColumns.current = columns;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "2.12.24",
3
+ "version": "2.12.25",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "cjs/index.js",