Browse Source

exclude target group from group selector

mizozobu 7 years ago
parent
commit
39844897f9
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/client/js/components/GroupDeleteModal/GroupDeleteModal.jsx

+ 6 - 2
src/client/js/components/GroupDeleteModal/GroupDeleteModal.jsx

@@ -115,8 +115,12 @@ class GroupDeleteModal extends React.Component {
 
 
   renderGroupSelector() {
   renderGroupSelector() {
     const options = this.state.groups.map((group) => {
     const options = this.state.groups.map((group) => {
-      const dataContent = `<i class="icon icon-fw icon-organization"></i> ${this.getGroupName(group)}`;
-      return <option key={group._id} value={group._id} data-content={dataContent}>{this.getGroupName(group)}</option>;
+      if (group._id !== this.state.deleteGroupId) {
+        const dataContent = `<i class="icon icon-fw icon-organization"></i> ${this.getGroupName(group)}`;
+        return <option key={group._id} value={group._id} data-content={dataContent}>{this.getGroupName(group)}</option>;
+      }
+
+      return;
     });
     });
 
 
     return (
     return (