@etsoo/react 1.4.18 → 1.4.19
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.
|
@@ -24,7 +24,7 @@ export function ResponsibleContainer(props) {
|
|
|
24
24
|
const rect = dimensions[0][2];
|
|
25
25
|
const showDataGrid = ((_a = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _a !== void 0 ? _a : 0) >= dataGridMinWidth;
|
|
26
26
|
React.useEffect(() => {
|
|
27
|
-
if (rect != null && rect.height
|
|
27
|
+
if (rect != null && rect.height >= 0 && height == null) {
|
|
28
28
|
let gridHeight = window.innerHeight - Math.round(rect.top + rect.height + 1);
|
|
29
29
|
const style = window.getComputedStyle(dimensions[0][1]);
|
|
30
30
|
const boxPadding = parseFloat(style.paddingLeft);
|
|
@@ -72,7 +72,7 @@ export function ResponsibleContainer(props) {
|
|
|
72
72
|
refs.current.ref.reset({ data });
|
|
73
73
|
};
|
|
74
74
|
// Layout
|
|
75
|
-
return (React.createElement(Stack,
|
|
75
|
+
return (React.createElement(Stack, { ref: hasFields ? undefined : dimensions[0][0] },
|
|
76
76
|
hasFields && (React.createElement(Box, { ref: dimensions[0][0], sx: searchBoxSx },
|
|
77
77
|
React.createElement(SearchBar, { fields: fields, onSubmit: onSubmit }))),
|
|
78
78
|
list));
|
package/package.json
CHANGED
|
@@ -152,7 +152,7 @@ export function ResponsibleContainer<
|
|
|
152
152
|
const showDataGrid = (rect?.width ?? 0) >= dataGridMinWidth;
|
|
153
153
|
|
|
154
154
|
React.useEffect(() => {
|
|
155
|
-
if (rect != null && rect.height
|
|
155
|
+
if (rect != null && rect.height >= 0 && height == null) {
|
|
156
156
|
let gridHeight =
|
|
157
157
|
window.innerHeight - Math.round(rect.top + rect.height + 1);
|
|
158
158
|
|
|
@@ -229,7 +229,7 @@ export function ResponsibleContainer<
|
|
|
229
229
|
|
|
230
230
|
// Layout
|
|
231
231
|
return (
|
|
232
|
-
<Stack>
|
|
232
|
+
<Stack ref={hasFields ? undefined : dimensions[0][0]}>
|
|
233
233
|
{hasFields && (
|
|
234
234
|
<Box ref={dimensions[0][0]} sx={searchBoxSx}>
|
|
235
235
|
<SearchBar fields={fields} onSubmit={onSubmit} />
|