Select all fields even those not loaded yet when doing Ctrl+A or Cmd+A on Record Table (#8849)

Solves
https://github.com/twentyhq/twenty/pull/8282#issuecomment-2508641480
This commit is contained in:
Baptiste Devessier
2024-12-05 06:11:48 +01:00
committed by GitHub
parent 02f34211b5
commit 99caab1412

View File

@ -53,14 +53,24 @@ export const RecordTableWithWrappers = ({
recordTableId,
);
const { resetTableRowSelection, selectAllRows } = useRecordTable({
recordTableId,
});
const { resetTableRowSelection, selectAllRows, setHasUserSelectedAllRows } =
useRecordTable({
recordTableId,
});
const handleSelectAllRows = () => {
setHasUserSelectedAllRows(true);
selectAllRows();
};
useScopedHotkeys('ctrl+a,meta+a', selectAllRows, TableHotkeyScope.Table);
useScopedHotkeys(
'ctrl+a,meta+a',
selectAllRows,
handleSelectAllRows,
TableHotkeyScope.Table,
);
useScopedHotkeys(
'ctrl+a,meta+a',
handleSelectAllRows,
ActionBarHotkeyScope.ActionBar,
);