willba-component-library 0.4.10 → 0.4.12

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/lib/index.js CHANGED
@@ -6892,6 +6892,18 @@ var useFilterActions = function (_a) {
6892
6892
  Pages.EVENTS;
6893
6893
  setSelectedPath(currentPath);
6894
6894
  }, [tabs]);
6895
+ // Clear loading state when page is restored from bfcache — react state
6896
+ // is preserved on back/forward navigation, otherwise SEARCH stays disabled
6897
+ React.useEffect(function () {
6898
+ if (typeof window === 'undefined')
6899
+ return;
6900
+ var handlePageShow = function (event) {
6901
+ if (event.persisted)
6902
+ setInnerLoading(false);
6903
+ };
6904
+ window.addEventListener('pageshow', handlePageShow);
6905
+ return function () { return window.removeEventListener('pageshow', handlePageShow); };
6906
+ }, [setInnerLoading]);
6895
6907
  var updateGuestsCount = function (id, newCount) {
6896
6908
  setAgeCategoryCounts(function (prev) {
6897
6909
  var _a;
@@ -6976,9 +6988,10 @@ var useFilterRefs = function () {
6976
6988
  };
6977
6989
  };
6978
6990
 
6991
+ var useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
6979
6992
  var usePanelPosition = function (_a) {
6980
6993
  var selectedFilter = _a.selectedFilter, panelRef = _a.panelRef, filtersRef = _a.filtersRef, buttonRefs = _a.buttonRefs;
6981
- React.useLayoutEffect(function () {
6994
+ useIsomorphicLayoutEffect$1(function () {
6982
6995
  var panel = panelRef.current;
6983
6996
  var filters = filtersRef.current;
6984
6997
  if (!panel || !filters)