fix: 🐛 Minor issues measurement panel related to description (#1142)
This commit is contained in:
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 });
|
||||
|
||||
Reference in new issue
Block a user