Add key-val pair with enter key
This commit is contained in:
parent
cb2c826436
commit
6aa4c8bd76
1 changed files with 5 additions and 0 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
>
|
>
|
||||||
<div class="uk-margin-remove uk-width-1-2">
|
<div class="uk-margin-remove uk-width-1-2">
|
||||||
<input
|
<input
|
||||||
|
ref="textboxKey"
|
||||||
v-model="newMetadata.key"
|
v-model="newMetadata.key"
|
||||||
class="uk-input uk-form-width-small uk-form-small"
|
class="uk-input uk-form-width-small uk-form-small"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
type="text"
|
type="text"
|
||||||
name="flavor"
|
name="flavor"
|
||||||
placeholder="Value"
|
placeholder="Value"
|
||||||
|
@keyup.enter="handleMetadataSubmit()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -94,6 +96,9 @@ export default {
|
||||||
this.newMetadata.value = "";
|
this.newMetadata.value = "";
|
||||||
|
|
||||||
this.$emit("input", newSelected);
|
this.$emit("input", newSelected);
|
||||||
|
|
||||||
|
// Move focus back to key textbox
|
||||||
|
this.$refs.textboxKey.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
delMetadataKey: function(key) {
|
delMetadataKey: function(key) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue