forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added keyboard functionality for esc and Ctrl + a (twentyhq#8282)
## Description - This PR fixes twentyhq#8247 twentyhq#8206 - Adds keyboard functionality for esc (deselect all records) and Ctrl + a (select records) ## Changes https://github.com/user-attachments/assets/7b2718d6-dbe5-4cd8-8ead-b6baed1fc357 Merged during stream 🎉 --------- Co-authored-by: Devessier <[email protected]>
- Loading branch information
1 parent
77165a2
commit 9e7b90a
Showing
5 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...s/object-record/record-board/states/selectors/recordBoardAllRecordIdsComponentSelector.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { recordBoardColumnIdsComponentState } from '@/object-record/record-board/states/recordBoardColumnIdsComponentState'; | ||
import { recordBoardRecordIdsByColumnIdComponentFamilyState } from '@/object-record/record-board/states/recordBoardRecordIdsByColumnIdComponentFamilyState'; | ||
import { createComponentReadOnlySelector } from '@/ui/utilities/state/component-state/utils/createComponentReadOnlySelector'; | ||
|
||
export const recordBoardAllRecordIdsComponentSelector = | ||
createComponentReadOnlySelector<string[]>({ | ||
key: 'recordBoardAllRecordIdsComponentSelector', | ||
get: | ||
({ scopeId }) => | ||
({ get }) => { | ||
const columnIds = get(recordBoardColumnIdsComponentState({ scopeId })); | ||
|
||
const recordIdsByColumn = columnIds.map((columnId) => | ||
get( | ||
recordBoardRecordIdsByColumnIdComponentFamilyState({ | ||
scopeId, | ||
familyKey: columnId, | ||
}), | ||
), | ||
); | ||
|
||
const recordIds = recordIdsByColumn.flat(); | ||
|
||
return recordIds; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters