fix: 🐛 Minor issues measurement panel related to description (#1142)

This commit is contained in:
ladeirarodolfo authored and Danny Brown committed 2019-11-03 22:53:24 -05:00
1 parent 54e07c281f
commit 681384b742
5 files changed
+17 -4

No files matched your search

@@ -152,6 +152,7 @@ export default class LabellingFlow extends Component {
ref={this.descriptionInput}
defaultValue={description || ''}
autoComplete="off"
onKeyPress={this.handleKeyPress}
/>
</div>
</div>
@@ -223,6 +224,12 @@ export default class LabellingFlow extends Component {
});
};
handleKeyPress = e => {
if (e.key === 'Enter') {
this.descriptionSave();
}
};
descriptionSave = () => {
const description = this.descriptionInput.current.value;
this.props.updateLabelling({ description });