1
0
Fork 0
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:
Bram Wiepjes 2022-11-23 20:02:44 +00:00
parent 6f4cba836d
commit 49f9cac0d3
2 changed files with 9 additions and 0 deletions
changelog.md
web-frontend/modules/database/components/field

View file

@ -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

View file

@ -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>