This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
src/components/views/dialogs Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -886,19 +886,21 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
886886 } ;
887887
888888 _toggleMember = ( member : Member ) => {
889- let filterText = this . state . filterText ;
890- const targets = this . state . targets . map ( t => t ) ; // cheap clone for mutation
891- const idx = targets . indexOf ( member ) ;
892- if ( idx >= 0 ) {
893- targets . splice ( idx , 1 ) ;
894- } else {
895- targets . push ( member ) ;
896- filterText = "" ; // clear the filter when the user accepts a suggestion
897- }
898- this . setState ( { targets, filterText} ) ;
889+ if ( ! this . state . busy ) {
890+ let filterText = this . state . filterText ;
891+ const targets = this . state . targets . map ( t => t ) ; // cheap clone for mutation
892+ const idx = targets . indexOf ( member ) ;
893+ if ( idx >= 0 ) {
894+ targets . splice ( idx , 1 ) ;
895+ } else {
896+ targets . push ( member ) ;
897+ filterText = "" ; // clear the filter when the user accepts a suggestion
898+ }
899+ this . setState ( { targets, filterText} ) ;
899900
900- if ( this . _editorRef && this . _editorRef . current ) {
901- this . _editorRef . current . focus ( ) ;
901+ if ( this . _editorRef && this . _editorRef . current ) {
902+ this . _editorRef . current . focus ( ) ;
903+ }
902904 }
903905 } ;
904906
You can’t perform that action at this time.
0 commit comments