Skip to content

Commit

Permalink
Document item create new item support enter key.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Jul 29, 2021
1 parent e88e9d9 commit 7cdb333
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions resources/assets/js/components/AkauntingItemButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:ref="'input-item-field-' + _uid"
v-model="search"
@input="onInput"
@keyup.enter="onInput"
@keydown.enter="onItemCreate"
/>
</div>
</span>
Expand Down Expand Up @@ -273,13 +273,14 @@ export default {
if (!this.search) {
return;
}
//condition that checks if input is below the given character limit
if (this.search.length < this.searchCharLimit) {
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.$emit('input', this.search); // keep the input binded to v-model
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.$emit('input', this.search); // keep the input binded to v-model
return;
return;
}
window.axios.get(url + '/common/items?search="' + this.search + '" limit:10')
Expand Down

0 comments on commit 7cdb333

Please sign in to comment.