@blocklet/list 0.12.49 → 0.12.50

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.
@@ -42,7 +42,8 @@ function FilterProvider(_ref) {
42
42
  wrapChildren,
43
43
  baseSearch,
44
44
  serverVersion,
45
- storeVersion
45
+ storeVersion,
46
+ fetchCategoryDelay
46
47
  } = _ref;
47
48
  const requestHeaders = {};
48
49
  if (serverVersion) {
@@ -222,7 +223,10 @@ function FilterProvider(_ref) {
222
223
  handleSearchSelect: onSearchSelect
223
224
  };
224
225
  (0, _react.useEffect)(() => {
225
- fetchCategories();
226
+ // sometimes blocklet list can be rendered only before the category is fetched
227
+ setTimeout(() => {
228
+ fetchCategories();
229
+ }, fetchCategoryDelay || 0);
226
230
  // eslint-disable-next-line react-hooks/exhaustive-deps
227
231
  }, [endpoint]);
228
232
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Provider, {