Document item create new item support enter key.
This commit is contained in:
parent
e88e9d9b8e
commit
7cdb333714
@ -26,7 +26,7 @@
|
|||||||
:ref="'input-item-field-' + _uid"
|
:ref="'input-item-field-' + _uid"
|
||||||
v-model="search"
|
v-model="search"
|
||||||
@input="onInput"
|
@input="onInput"
|
||||||
@keyup.enter="onInput"
|
@keydown.enter="onItemCreate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
@ -273,13 +273,14 @@ export default {
|
|||||||
if (!this.search) {
|
if (!this.search) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//condition that checks if input is below the given character limit
|
//condition that checks if input is below the given character limit
|
||||||
if (this.search.length < this.searchCharLimit) {
|
if (this.search.length < this.searchCharLimit) {
|
||||||
this.setItemList(this.items); //once the user deletes the search input, we show the overall item list
|
this.setItemList(this.items); //once the user deletes the search input, we show the overall item list
|
||||||
this.sortItems(); // we order it as wanted
|
this.sortItems(); // we order it as wanted
|
||||||
this.$emit('input', this.search); // keep the input binded to v-model
|
this.$emit('input', this.search); // keep the input binded to v-model
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
window.axios.get(url + '/common/items?search="' + this.search + '" limit:10')
|
window.axios.get(url + '/common/items?search="' + this.search + '" limit:10')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user