@etsoo/materialui 1.4.34 → 1.4.35

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.
@@ -172,11 +172,14 @@ export function ResponsibleContainer(props) {
172
172
  ];
173
173
  })();
174
174
  const searchBar = React.useMemo(() => {
175
- if (!hasFields || showDataGrid == null)
175
+ if (!hasFields ||
176
+ showDataGrid == null ||
177
+ rect?.width == null ||
178
+ rect.width < 20)
176
179
  return;
177
180
  const f = typeof fields == "function" ? fields(searchData ?? {}) : fields;
178
181
  return (_jsx(SearchBar, { fields: f, onSubmit: onSubmit, className: `searchBar${showDataGrid ? "Grid" : "List"}` }));
179
- }, [showDataGrid, hasFields, searchBarHeight]);
182
+ }, [showDataGrid, hasFields, searchBarHeight, rect?.width]);
180
183
  // Pull container
181
184
  const pullContainer = showDataGrid == null
182
185
  ? undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.4.34",
3
+ "version": "1.4.35",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -429,7 +429,13 @@ export function ResponsibleContainer<
429
429
  })();
430
430
 
431
431
  const searchBar = React.useMemo(() => {
432
- if (!hasFields || showDataGrid == null) return;
432
+ if (
433
+ !hasFields ||
434
+ showDataGrid == null ||
435
+ rect?.width == null ||
436
+ rect.width < 20
437
+ )
438
+ return;
433
439
 
434
440
  const f = typeof fields == "function" ? fields(searchData ?? {}) : fields;
435
441
 
@@ -440,7 +446,7 @@ export function ResponsibleContainer<
440
446
  className={`searchBar${showDataGrid ? "Grid" : "List"}`}
441
447
  />
442
448
  );
443
- }, [showDataGrid, hasFields, searchBarHeight]);
449
+ }, [showDataGrid, hasFields, searchBarHeight, rect?.width]);
444
450
 
445
451
  // Pull container
446
452
  const pullContainer =