mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
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:
1 parent
1f2730a64f
commit
bb4c82ea5a
10 files changed
+95
-31
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user