Prevent state to be toggled whilst a request is pending

pull/21833/head
Germain Souquet 2021-03-23 18:25:03 +00:00
parent 1f6f9ca983
commit b8692bdf17
1 changed files with 14 additions and 12 deletions

View File

@ -886,6 +886,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
};
_toggleMember = (member: Member) => {
if (!this.state.busy) {
let filterText = this.state.filterText;
const targets = this.state.targets.map(t => t); // cheap clone for mutation
const idx = targets.indexOf(member);
@ -900,6 +901,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
if (this._editorRef && this._editorRef.current) {
this._editorRef.current.focus();
}
}
};
_removeMember = (member: Member) => {