mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-17 18:32:35 +00:00
Resolve "Allow users to use their keyboard to input new items into single/multi select lists"
This commit is contained in:
parent
6f4cba836d
commit
49f9cac0d3
2 changed files with 9 additions and 0 deletions
|
@ -11,6 +11,8 @@ For example:
|
|||
|
||||
### New Features
|
||||
|
||||
* Allow creating a new option by pressing enter in the dropdown [#1169](https://gitlab.com/bramw/baserow/-/issues/1169)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
### Refactors
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
:placeholder="searchText"
|
||||
tabindex="0"
|
||||
@keyup="search(query)"
|
||||
@keydown.enter="createOptionViaSearch($event, query)"
|
||||
/>
|
||||
</div>
|
||||
<ul
|
||||
|
@ -139,6 +140,12 @@ export default {
|
|||
}
|
||||
this.$emit('create-option', { value, done })
|
||||
},
|
||||
createOptionViaSearch(event, query) {
|
||||
if (this.canCreateOption) {
|
||||
event.stopPropagation()
|
||||
this.createOption(query)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue