Commit cd80a01
authored
feat: sync hash state when initial value changes asynchronously (#858)
When saved settings load asynchronously via useSavedSettings, the
initial parameter to useHashState changes after first render. Previously,
the hook ignored changes to initial, causing saved settings to not apply.
Now tracks whether hash param was explicitly in URL on mount. If hash
was not explicit, state syncs with initial when it changes.
Fixes NEO-653, NEO-6571 parent f096c60 commit cd80a01
File tree
6 files changed
+546
-18
lines changed- demo
- src/lib
- test
6 files changed
+546
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
0 commit comments