fix(audit): H15 (saved-view sort) + H14 (back/forward URL resync) in usePaginatedQuery
H15: new applyView({filters,sort}) atomic mutator (one URL write) restores a
saved view's sort, threaded through all six list components instead of being
discarded. H14: a guarded effect resyncs page/sort/filters FROM the URL on
Back/Forward; the resync setStates carry a scoped, justified
set-state-in-effect disable (loop-guarded external-URL sync).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -83,7 +83,7 @@ export function ResidentialInterestsList() {
|
||||
setPageSize,
|
||||
filters,
|
||||
setFilter,
|
||||
setAllFilters,
|
||||
applyView,
|
||||
clearFilters,
|
||||
} = usePaginatedQuery<ResidentialInterestRow>({
|
||||
queryKey: ['residential-interests'],
|
||||
@@ -193,7 +193,9 @@ export function ResidentialInterestsList() {
|
||||
<div className="ml-auto flex flex-wrap items-center gap-2">
|
||||
<SavedViewsDropdown
|
||||
entityType="residential_interests"
|
||||
onApplyView={(savedFilters) => setAllFilters(savedFilters)}
|
||||
onApplyView={(savedFilters, savedSort) =>
|
||||
applyView({ filters: savedFilters, sort: savedSort })
|
||||
}
|
||||
/>
|
||||
<ColumnPicker
|
||||
columns={RESIDENTIAL_INTEREST_COLUMN_OPTIONS}
|
||||
|
||||
Reference in New Issue
Block a user