Skip to content

Commit

Permalink
ACS-8036 handle event when dropdown closed
Browse files Browse the repository at this point in the history
  • Loading branch information
g-jaskowski authored and DaryaBalvanovich committed Aug 12, 2024
1 parent f7e1c51 commit 73597d9
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,18 @@ export class BulkActionsDropdownComponent implements OnInit, OnDestroy {
this.onDestroy$.complete();
}

runAction(actionsDropdownEvent: BulkActionsDropdownSelectionEvent) {
if (actionsDropdownEvent.event.source.selected) {
this.extensions.runActionById(actionsDropdownEvent.actionOption.actions.click, {
focusedElementOnCloseSelector: '.adf-context-menu-source'
});
runAction(actionOption: ContentActionRef) {
this.extensions.runActionById(actionOption.actions.click, {
focusedElementOnCloseSelector: '.adf-context-menu-source'
});
}

onKeyDown(event: KeyboardEvent) {
if (event.key === 'Tab') {
this.bulkSelectControl.setValue(null);
}
if (event.key === 'Enter' && this.bulkSelectControl.value) {
this.runAction(this.bulkSelectControl.value);
}
}
}

0 comments on commit 73597d9

Please sign in to comment.