Web: Accounts: Hotkeys: Groups: added selectAll action
This commit is contained in:
parent
80d1b1f378
commit
f078c29e36
@ -582,7 +582,6 @@ const InsideGroupTableRow = (props) => {
|
||||
color={sideInfoColor}
|
||||
onClick={onEmailClick}
|
||||
isTextOverflow
|
||||
enableUserSelect
|
||||
dir="auto"
|
||||
>
|
||||
{email}
|
||||
|
@ -585,7 +585,6 @@ const PeopleTableRow = (props) => {
|
||||
color={sideInfoColor}
|
||||
onClick={onEmailClick}
|
||||
isTextOverflow
|
||||
enableUserSelect
|
||||
dir="auto"
|
||||
>
|
||||
{email}
|
||||
|
@ -144,7 +144,6 @@ export default inject(({ peopleStore }) => {
|
||||
setSelection: setPeopleSelection,
|
||||
setBufferSelection: setPeopleBufferSelection,
|
||||
selectUser,
|
||||
selectAll,
|
||||
} = peopleStore.selectionStore;
|
||||
|
||||
const {
|
||||
@ -161,6 +160,8 @@ export default inject(({ peopleStore }) => {
|
||||
activateHotkeys,
|
||||
setHotkeyCaretStart,
|
||||
setHotkeyCaret,
|
||||
|
||||
selectAll,
|
||||
deselectAll,
|
||||
} = peopleStore.accountsHotkeysStore;
|
||||
|
||||
|
@ -218,6 +218,14 @@ class AccountsHotkeysStore {
|
||||
setSelected("none");
|
||||
};
|
||||
|
||||
selectAll = () => {
|
||||
const { selectAll } = this.isAccountsPage
|
||||
? this.peopleStore.selectionStore
|
||||
: this.peopleStore.groupsStore;
|
||||
|
||||
selectAll();
|
||||
};
|
||||
|
||||
activateHotkeys = (e: KeyboardEvent) => {
|
||||
const infiniteLoaderComponent = document.getElementsByClassName(
|
||||
"ReactVirtualized__List",
|
||||
|
@ -365,6 +365,12 @@ class GroupsStore {
|
||||
return selected;
|
||||
};
|
||||
|
||||
selectAll = () => {
|
||||
this.bufferSelection = null;
|
||||
|
||||
if (this.groups?.length) this.setSelection(this.groups);
|
||||
};
|
||||
|
||||
getGroupsBySelected = (selected: "all" | "none") => {
|
||||
if (selected === "all" && this.groups) return [...this.groups];
|
||||
return [];
|
||||
|
Loading…
Reference in New Issue
Block a user