mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-08 07:28:26 +00:00
Prevent state to be toggled whilst a request is pending
This commit is contained in:
@@ -886,6 +886,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||||||
};
|
};
|
||||||
|
|
||||||
_toggleMember = (member: Member) => {
|
_toggleMember = (member: Member) => {
|
||||||
|
if (!this.state.busy) {
|
||||||
let filterText = this.state.filterText;
|
let filterText = this.state.filterText;
|
||||||
const targets = this.state.targets.map(t => t); // cheap clone for mutation
|
const targets = this.state.targets.map(t => t); // cheap clone for mutation
|
||||||
const idx = targets.indexOf(member);
|
const idx = targets.indexOf(member);
|
||||||
@@ -900,6 +901,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||||||
if (this._editorRef && this._editorRef.current) {
|
if (this._editorRef && this._editorRef.current) {
|
||||||
this._editorRef.current.focus();
|
this._editorRef.current.focus();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
_removeMember = (member: Member) => {
|
_removeMember = (member: Member) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user