mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
feat(furni-editor): modernize search/list view + live search + server sort
- Restyle to match the editor: slate palette, rounded card, search bar with icon + focus ring, teal filter chips, larger furni thumbnails, loading skeleton + empty state. - Live search (350ms debounce) with clear button; filters/sort apply immediately. - Pagination: first/prev/next/last + page-jump input + 'Showing X-Y of Z' (was Prev/Next only across 3002 pages). - Header sort now queries the server (sortField/sortDir) instead of reordering only the 20 visible rows; useFurniEditor.searchItems passes the sort through.
This commit is contained in:
@@ -209,11 +209,11 @@ export const useFurniEditor = () =>
|
||||
}
|
||||
});
|
||||
|
||||
const searchItems = useCallback((query: string, type: string, pg: number) =>
|
||||
const searchItems = useCallback((query: string, type: string, pg: number, sortField: string = 'id', sortDir: string = 'asc') =>
|
||||
{
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
SendMessageComposer(new FurniEditorSearchComposer(query, type, pg));
|
||||
SendMessageComposer(new FurniEditorSearchComposer(query, type, pg, sortField, sortDir));
|
||||
}, []);
|
||||
|
||||
const loadDetail = useCallback((id: number) =>
|
||||
|
||||
Reference in New Issue
Block a user