@itwin/itwinui-react 3.13.3 → 3.13.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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.13.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2138](https://github.com/iTwin/iTwinUI/pull/2138): Fixed an issue in `Table` column resizing where passing in a `width` value that was less than the column's default `minWidth` would cause an undesirable shift when the column was resized.
8
+ - [#2170](https://github.com/iTwin/iTwinUI/pull/2170): Fixed an issue in virtualized `Tree` where the `style` prop passed to `TreeNode` was not respected.
9
+ - [#2170](https://github.com/iTwin/iTwinUI/pull/2170): Fixed an issue in virtualized `Tree` where horizontal scroll was impossible to achieve.
10
+ - [#2174](https://github.com/iTwin/iTwinUI/pull/2174): Fixed an issue in `Table` where the virtualizer was being initialized when the `enableVirtualization` prop wasn't set to `true`.
11
+
3
12
  ## 3.13.3
4
13
 
5
14
  ### Patch Changes
@@ -291,6 +291,7 @@ const Table = (props)=>{
291
291
  }
292
292
  });
293
293
  let { virtualizer, css: virtualizerCss } = (0, _index.useVirtualScroll)({
294
+ enabled: enableVirtualization,
294
295
  count: page.length,
295
296
  getScrollElement: ()=>tableRef.current,
296
297
  estimateSize: ()=>rowHeight,
@@ -411,7 +412,10 @@ const Table = (props)=>{
411
412
  if ([
412
413
  void 0,
413
414
  0
414
- ].includes(column.minWidth)) column.minWidth = columnHasExpanders ? COLUMN_MIN_WIDTHS.withExpander : COLUMN_MIN_WIDTHS.default;
415
+ ].includes(column.minWidth)) {
416
+ column.minWidth = columnHasExpanders ? COLUMN_MIN_WIDTHS.withExpander : COLUMN_MIN_WIDTHS.default;
417
+ if ('number' == typeof column.width && column.minWidth > column.width) column.minWidth = column.width;
418
+ }
415
419
  let columnProps = column.getHeaderProps({
416
420
  ...restSortProps,
417
421
  className: (0, _classnames.default)('iui-table-cell', {
@@ -108,7 +108,8 @@ const Tree = (props)=>{
108
108
  'data-iui-virtualizer': 'item',
109
109
  ref: virtualizer.measureElement,
110
110
  style: {
111
- width: '100%',
111
+ ...children.props.style,
112
+ '--_iui-width': '100%',
112
113
  transform: `translateY(${virtualItem.start}px)`
113
114
  }
114
115
  })) : nodeRenderer(node.nodeProps));
package/DEV-cjs/styles.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="3.13.3";const u=new Proxy({},{get(t,i){if(typeof i=="string"&&i.startsWith("iui-"))return i.replace("iui-",`_iui${e.replace(/\./g,"")}-`)},has(t,i){return typeof i=="string"&&i.startsWith("iui-")}});exports.styles=u;exports.version=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="3.13.4";const u=new Proxy({},{get(t,i){if(typeof i=="string"&&i.startsWith("iui-"))return i.replace("iui-",`_iui${e.replace(/\./g,"")}-`)},has(t,i){return typeof i=="string"&&i.startsWith("iui-")}});exports.styles=u;exports.version=e;
@@ -271,6 +271,7 @@ export const Table = (props)=>{
271
271
  }
272
272
  });
273
273
  let { virtualizer, css: virtualizerCss } = useVirtualScroll({
274
+ enabled: enableVirtualization,
274
275
  count: page.length,
275
276
  getScrollElement: ()=>tableRef.current,
276
277
  estimateSize: ()=>rowHeight,
@@ -391,7 +392,10 @@ export const Table = (props)=>{
391
392
  if ([
392
393
  void 0,
393
394
  0
394
- ].includes(column.minWidth)) column.minWidth = columnHasExpanders ? COLUMN_MIN_WIDTHS.withExpander : COLUMN_MIN_WIDTHS.default;
395
+ ].includes(column.minWidth)) {
396
+ column.minWidth = columnHasExpanders ? COLUMN_MIN_WIDTHS.withExpander : COLUMN_MIN_WIDTHS.default;
397
+ if ('number' == typeof column.width && column.minWidth > column.width) column.minWidth = column.width;
398
+ }
395
399
  let columnProps = column.getHeaderProps({
396
400
  ...restSortProps,
397
401
  className: cx('iui-table-cell', {
@@ -97,7 +97,8 @@ export const Tree = (props)=>{
97
97
  'data-iui-virtualizer': 'item',
98
98
  ref: virtualizer.measureElement,
99
99
  style: {
100
- width: '100%',
100
+ ...children.props.style,
101
+ '--_iui-width': '100%',
101
102
  transform: `translateY(${virtualItem.start}px)`
102
103
  }
103
104
  })) : nodeRenderer(node.nodeProps));
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = "3.13.3";
1
+ const t = "3.13.4";
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -430,6 +430,7 @@ const Table = (props) => {
430
430
  }
431
431
  });
432
432
  let { virtualizer, css: virtualizerCss } = (0, _index.useVirtualScroll)({
433
+ enabled: enableVirtualization,
433
434
  count: page.length,
434
435
  getScrollElement: () => tableRef.current,
435
436
  estimateSize: () => rowHeight,
@@ -589,10 +590,16 @@ const Table = (props) => {
589
590
  headerGroup.headers.findIndex(
590
591
  (c) => c.id !== _index4.SELECTION_CELL_ID,
591
592
  );
592
- if ([void 0, 0].includes(column.minWidth))
593
+ if ([void 0, 0].includes(column.minWidth)) {
593
594
  column.minWidth = columnHasExpanders
594
595
  ? COLUMN_MIN_WIDTHS.withExpander
595
596
  : COLUMN_MIN_WIDTHS.default;
597
+ if (
598
+ 'number' == typeof column.width &&
599
+ column.minWidth > column.width
600
+ )
601
+ column.minWidth = column.width;
602
+ }
596
603
  let columnProps = column.getHeaderProps({
597
604
  ...restSortProps,
598
605
  className: (0, _classnames.default)(
@@ -125,7 +125,8 @@ const Tree = (props) => {
125
125
  'data-iui-virtualizer': 'item',
126
126
  ref: virtualizer.measureElement,
127
127
  style: {
128
- width: '100%',
128
+ ...children.props.style,
129
+ '--_iui-width': '100%',
129
130
  transform: `translateY(${virtualItem.start}px)`,
130
131
  },
131
132
  }),
package/cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.13.3';
3
+ const e = '3.13.4';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -448,6 +448,7 @@ export const Table = (props) => {
448
448
  }
449
449
  });
450
450
  let { virtualizer, css: virtualizerCss } = useVirtualScroll({
451
+ enabled: enableVirtualization,
451
452
  count: page.length,
452
453
  getScrollElement: () => tableRef.current,
453
454
  estimateSize: () => rowHeight,
@@ -604,10 +605,16 @@ export const Table = (props) => {
604
605
  headerGroup.headers.findIndex(
605
606
  (c) => c.id !== SELECTION_CELL_ID,
606
607
  );
607
- if ([void 0, 0].includes(column.minWidth))
608
+ if ([void 0, 0].includes(column.minWidth)) {
608
609
  column.minWidth = columnHasExpanders
609
610
  ? COLUMN_MIN_WIDTHS.withExpander
610
611
  : COLUMN_MIN_WIDTHS.default;
612
+ if (
613
+ 'number' == typeof column.width &&
614
+ column.minWidth > column.width
615
+ )
616
+ column.minWidth = column.width;
617
+ }
611
618
  let columnProps = column.getHeaderProps({
612
619
  ...restSortProps,
613
620
  className: cx(
@@ -120,7 +120,8 @@ export const Tree = (props) => {
120
120
  'data-iui-virtualizer': 'item',
121
121
  ref: virtualizer.measureElement,
122
122
  style: {
123
- width: '100%',
123
+ ...children.props.style,
124
+ '--_iui-width': '100%',
124
125
  transform: `translateY(${virtualItem.start}px)`,
125
126
  },
126
127
  }))
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.13.3';
1
+ const t = '3.13.4';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.13.3",
3
+ "version": "3.13.4",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",