@onehat/ui 0.3.211 → 0.3.213

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.3.211",
3
+ "version": "0.3.213",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -123,6 +123,7 @@ function GridComponent(props) {
123
123
  verifyCanEdit,
124
124
  alternateRowBackgrounds = true,
125
125
  alternatingInterval = 2,
126
+ defaultRowHeight = 48,
126
127
 
127
128
  // withComponent
128
129
  self,
@@ -698,8 +699,7 @@ function GridComponent(props) {
698
699
  headerHeight = showHeaders ? 50 : 0,
699
700
  footerHeight = !disablePagination ? 50 : 0,
700
701
  height = containerHeight - headerHeight - footerHeight,
701
- rowHeight = 48,
702
- rowsPerContainer = Math.floor(height / rowHeight);
702
+ rowsPerContainer = Math.floor(height / defaultRowHeight);
703
703
  let pageSize = rowsPerContainer;
704
704
  if (showHeaders) {
705
705
  pageSize--;
@@ -42,7 +42,7 @@ export default function withPdfButton(WrappedComponent) {
42
42
 
43
43
  } = props,
44
44
  [isModalShown, setIsModalShown] = useState(false),
45
- [width, height] = useAdjustedWindowSize(500, 800),
45
+ [width, height] = useAdjustedWindowSize(510, 800), // 510 so it's over the stack threshold
46
46
  propertyNames = [],
47
47
  buildModalItems = () => {
48
48
  const modalItems = _.map(_.cloneDeep(items), (item, ix) => buildNextLayer(item, ix, columnDefaults)); // clone, as we don't want to alter the item by reference