feat(downloads): add column layout reset action

This commit is contained in:
Sucukdeluxe
2026-08-20 23:56:15 +02:00
parent cee3e988f6
commit 9942b2275e
4 changed files with 47 additions and 5 deletions
@@ -52,8 +52,9 @@ export interface DownloadsViewModel extends DownloadsViewModelCore {
status: DownloadsStatusModel;
}
export interface DownloadsViewActions extends DownloadsTableActions {
onDisplayModeChange: (mode: DownloadDisplayMode) => void;
export interface DownloadsViewActions extends DownloadsTableActions {
onResetColumnLayout: () => void;
onDisplayModeChange: (mode: DownloadDisplayMode) => void;
onFilterChange: (filter: DownloadSidebarFilter) => void;
onProviderFilterChange: (provider: string) => void;
onQueryChange: (query: string) => void;
@@ -148,7 +149,7 @@ export function DownloadsContent({ actions, model }: { actions: DownloadsViewAct
return (
<main className="downloads-content">
<div className="downloads-table" role="table" aria-label="Downloads">
<DownloadsTableHeader actions={actions} columnOrder={model.columnOrder} gridTemplate={model.gridTemplate} selectedCount={model.actionableSelectedIds.length} sortColumn={model.sortColumn ?? "name"} sortDirection={model.sortDirection ?? "asc"} visibleIds={model.visibleRowIds} />
<DownloadsTableHeader actions={actions} columnOrder={model.columnOrder} gridTemplate={model.gridTemplate} onResetColumnLayout={actions.onResetColumnLayout} selectedCount={model.actionableSelectedIds.length} sortColumn={model.sortColumn ?? "name"} sortDirection={model.sortDirection ?? "asc"} visibleIds={model.visibleRowIds} />
<VirtualizedDownloadsBody actions={actions} model={model} state={state} />
</div>
</main>