categoryAddingNewLabel (#995)

This commit is contained in:
Colin Megill
2019-10-24 22:02:38 -04:00
committed by GitHub
parent 60a23b681c
commit 934f61f2a1
2 changed files with 6 additions and 2 deletions
@@ -86,7 +86,7 @@ class Category extends React.Component {
const { dispatch, metadataField } = this.props; const { dispatch, metadataField } = this.props;
const { newLabelText } = this.state; const { newLabelText } = this.state;
/* /*
XXX TODO - temporary code generates random label string. Remove XXX TODO - temporary code generates random label string. Remove
when the label creation UI is implemented. when the label creation UI is implemented.
const { newLabelText } = this.state; const { newLabelText } = this.state;
@@ -315,7 +315,10 @@ class Category extends React.Component {
<Dialog <Dialog
icon="tag" icon="tag"
title="Add new label" title="Add new label"
isOpen={annotations.isAddingNewLabel} isOpen={
annotations.isAddingNewLabel &&
annotations.categoryAddingNewLabel === metadataField
}
onClose={this.disableAddNewLabelMode} onClose={this.disableAddNewLabelMode}
> >
<form <form
+1
View File
@@ -6,6 +6,7 @@ const Annotations = (
isEditingCategoryName: false, isEditingCategoryName: false,
isEditingLabelName: false, isEditingLabelName: false,
categoryBeingEdited: false, categoryBeingEdited: false,
categoryAddingNewLabel: null,
labelEditable: { category: null, label: null } labelEditable: { category: null, label: null }
}, },
action action