Scenario
Filtered support queues need recovery
The user goal is to try different views without getting stuck in an
empty result or forgotten sort order.
reset-state
hash-state
filter-state
Try it
Make a messy view, then reset it
- Sort by Severity or Age.
- Filter by team or state until only one or no rows are visible.
- Notice the hash parameters update.
- Activate Reset queue and confirm rows, filters, sort state, and status recover.
Example
Support incident queue
Choose filters to narrow the queue.
Reset status will appear here.
No incidents match the selected filters.
Scroll horizontally to view all columns.
Support incidents
|
|
|
|
|
|
| INC-204 |
1 - Critical |
42 min |
Frontend |
Open |
| INC-203 |
2 - High |
118 min |
Platform |
Blocked |
| INC-202 |
3 - Medium |
12 min |
Billing |
Resolved |
| INC-201 |
2 - High |
75 min |
Frontend |
Blocked |
Accessibility notes
Recovery is explicit
- The reset action is a real button.
- Filter controls use visible labels and native selects.
- Result and reset messages use polite live regions.
- Rows are restored from the
hidden state.
- The helper dispatches
a11y-sortable-table:reset for other addons.
Developer notes
Copy points
- Use
createSortableTableReset after table initialization.
- Pass a trigger button or call
resetController.reset().
- Keep filter hash prefixes consistent with filter-state.
- Use a status element so reset recovery is announced.
Import path
Reset helper setup
import { createSortableTable } from "../../dist/index.js";
import { createSortableTableReset } from "../../dist/reset-state.js";
const instance = createSortableTable(table, { allowUnsort: true });
createSortableTableReset(instance, {
table,
trigger: "#reset-queue",
statusElement: "#reset-status",
filterPrefix: "filter-",
sortParamName: "sort"
});