diff --git a/src/system/components/data-input/Select/Select.vue b/src/system/components/data-input/Select/Select.vue
index 11753031a..c6fb90bfb 100755
--- a/src/system/components/data-input/Select/Select.vue
+++ b/src/system/components/data-input/Select/Select.vue
@@ -10,7 +10,7 @@
@keydown.tab="closeAndBlur"
@keydown.self.down.prevent="pointerNext"
@keydown.self.up.prevent="pointerPrev"
- @keypress.enter.prevent.stop.self="selectPointerOption"
+ @keypress.enter.prevent.stop="handleEnter"
@keyup.esc="close">
{
+ default: (option, searchString = '') => {
const value = option.value || option
+ const searchParts = (typeof searchString === 'string') ? searchString.split(' ') : []
return searchParts.every(part => {
if (!part) {
return true
@@ -260,9 +261,8 @@ export default {
if (!this.searchString) {
return this.options
}
- const searchParts = this.searchString.split(' ')
- return this.options.filter(this.filter)
+ return this.options.filter((option) => this.filter(option, this.searchString))
},
pointerMax() {
return this.filteredOptions.length - 1
@@ -320,6 +320,17 @@ export default {
this.deselectOption(this.innerValue.length - 1)
}
},
+ handleEnter(e) {
+ console.log('Pointer', this.pointer)
+ if (this.pointer) {
+ console.log('SELECT')
+
+ this.selectPointerOption(e)
+ } else {
+ console.log('ENTER')
+ this.$emit('enter', e)
+ }
+ },
handleKeyUp() {
if (!this.isOpen) {
this.open()