@promoboxx/use-filter 1.5.3 → 1.5.4
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/dist/useFilter.js +4 -1
- package/package.json +1 -1
package/dist/useFilter.js
CHANGED
|
@@ -33,7 +33,10 @@ var shallowEqual_1 = __importDefault(require("./lib/shallowEqual"));
|
|
|
33
33
|
var store_1 = require("./store");
|
|
34
34
|
function useFilter(namespace, options) {
|
|
35
35
|
var _a = react_1.useState(function () {
|
|
36
|
-
|
|
36
|
+
var existing = store_1.getFilterStore().getFilter(namespace);
|
|
37
|
+
var initialValue = existing
|
|
38
|
+
? __assign(__assign({}, existing), { shouldRunImmediately: true }) : undefined;
|
|
39
|
+
return initialValue;
|
|
37
40
|
}), filterInfo = _a[0], setFilterInfoState = _a[1];
|
|
38
41
|
var _b = react_1.useState(function () {
|
|
39
42
|
return store_1.getFilterStore().getData(namespace);
|