mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Write the URL immediately when a search filter is cleared
The search box clear (X) button cleared the filter live but only wrote the URL when the dropdown closed. commitFilter now accepts an explicit value so the clear handlers can commit right away (avoiding the stale-state race of reading the live override in the same event), for both useColumnSearch and the Users filter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
bb4c82ea5a
commit
2898fdf5d3
3 files changed
+22
-12
No files matched your search
@@ -47,6 +47,8 @@ export default function useColumnSearch<T>(
|
||||
onClear={() => {
|
||||
setSelectedKeys([]);
|
||||
tableState.setFilter(columnKey, null);
|
||||
// Clearing is a deliberate action, so write it to the URL right away.
|
||||
tableState.commitFilter(columnKey, null);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user