GH-3106 Ability to multi-note/task with action bar (#3137)

* GH-3106 fix activity drawer opener for selected rows hook

* GH-3106 ability to multi note/task with action bar

* GH-3106 use snapshot to get selected row IDs

* GH-3106 format code & fix linting issues

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Deepak Kumar
2023-12-26 22:14:23 +05:30
committed by GitHub
parent 3535ef5053
commit b650b1dca3
2 changed files with 31 additions and 14 deletions

View File

@ -20,11 +20,11 @@ export const useOpenCreateActivityDrawerForSelectedRowIds = () => {
entityType: ActivityTargetableEntityType,
relatedEntities?: ActivityTargetableEntity[],
) => {
const selectedRowIds = Object.keys(
snapshot.getLoadable(selectedRowIdsSelector).getValue(),
);
const selectedRowIds = snapshot
.getLoadable(selectedRowIdsSelector)
.getValue();
let activityTargetableEntityArray: ActivityTargetableEntity[] =
selectedRowIds.map((id) => ({
selectedRowIds.map((id: string) => ({
type: entityType,
id,
}));