Make all table search live and only write the URL on close

Add a live filter override to useTableQueryState: setFilter updates the filter
immediately (so every table's search filters as you type) without touching the
URL, and commitFilter writes it to the URL when the filter dropdown closes.
useColumnSearch and useUserFilter now filter live via setFilter and commit on
close, so the Users table no longer rewrites the URL on every keystroke and the
other tables gain live search.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 4.8 committed 2026-07-02 00:14:32 +00:00
1 parent 1f2730a64f
commit bb4c82ea5a
10 files changed
+95 -31

No files matched your search

+3 -1
View File
@@ -39,7 +39,9 @@ function StoragePage() {
const tableState = useTableQueryState<[string, Item]>({
namespace: "storage", defaultSortKey: "quantity", defaultSortOrder: "descend", pagination: false,
});
const resourceSearch = useColumnSearch<[string, Item]>(item => getLocaleName(item[1].name), "Search");
const resourceSearch = useColumnSearch<[string, Item]>(
tableState, "resource", item => getLocaleName(item[1].name), "Search"
);
function getLocaleName(itemName: string) {
let localeName = itemName;