willba-component-library 0.4.10 → 0.4.11

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;