@visns-studio/visns-components 6.3.9 → 6.3.10

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/package.json CHANGED
@@ -91,7 +91,7 @@
91
91
  "react-dom": "^17.0.0 || ^18.0.0"
92
92
  },
93
93
  "name": "@visns-studio/visns-components",
94
- "version": "6.3.9",
94
+ "version": "6.3.10",
95
95
  "description": "Various packages to assist in the development of our Custom Applications.",
96
96
  "main": "src/index.js",
97
97
  "files": [
@@ -3749,9 +3749,29 @@ const DataGrid = forwardRef(
3749
3749
  entries.filter(isRowActionConfig);
3750
3750
  // Per-row conditions may hide row actions at
3751
3751
  // runtime, but the column must fit the maximum
3752
- const width = actionColumnWidthFor(
3753
- actionSettings.length + rowActions.length
3754
- );
3752
+ const actionCount =
3753
+ actionSettings.length + rowActions.length;
3754
+ const computedWidth =
3755
+ actionColumnWidthFor(actionCount);
3756
+ // An explicit config maxWidth may narrow the
3757
+ // column below the 100px floor (a single-icon
3758
+ // column doesn't need it), but never below
3759
+ // what the icons themselves need — tap targets
3760
+ // stay intact in tablet mode.
3761
+ const iconsNeed =
3762
+ actionCount *
3763
+ (isTabletMode ? 44 : 34) +
3764
+ 16;
3765
+ const width =
3766
+ column.maxWidth != null
3767
+ ? Math.max(
3768
+ iconsNeed,
3769
+ Math.min(
3770
+ column.maxWidth,
3771
+ computedWidth
3772
+ )
3773
+ )
3774
+ : computedWidth;
3755
3775
  return {
3756
3776
  ...commonProps,
3757
3777
  name: Array.isArray(column.id)