Action bar add delete count (#4470)

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
brendanlaschke
2024-03-18 16:11:02 +01:00
committed by GitHub
parent 411aac5efc
commit 2aa6bcdb70

View File

@ -106,7 +106,7 @@ export const useRecordActionBar = ({
const baseActions: ContextMenuEntry[] = useMemo( const baseActions: ContextMenuEntry[] = useMemo(
() => [ () => [
{ {
label: 'Delete', label: `Delete (${selectedRecordIds.length})`,
Icon: IconTrash, Icon: IconTrash,
accent: 'danger', accent: 'danger',
onClick: () => handleDeleteClick(), onClick: () => handleDeleteClick(),
@ -118,7 +118,7 @@ export const useRecordActionBar = ({
onClick: () => download(), onClick: () => download(),
}, },
], ],
[handleDeleteClick, download, progress], [handleDeleteClick, download, progress, selectedRecordIds],
); );
const dataExecuteQuickActionOnmentEnabled = useIsFeatureEnabled( const dataExecuteQuickActionOnmentEnabled = useIsFeatureEnabled(