Skip to content

Commit

Permalink
fix(kselect, kmultiselect): create item on enter logic (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM authored Nov 13, 2024
1 parent aab1eb9 commit f982c25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/KMultiselect/KMultiselect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ const handleItemSelect = (item: MultiselectItem, isNew?: boolean) => {
}
const onInputEnter = (e: KeyboardEvent): void => {
if (!filteredItems.value.length && props.enableItemCreation) {
if (props.enableItemCreation) {
handleAddItem()
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/KSelect/KSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ const onInputKeypress = (event: Event) => {
}
const onInputEnter = (e: KeyboardEvent): void => {
if (!filteredItems.value.length && props.enableItemCreation) {
if (props.enableItemCreation) {
handleAddItem()
}
Expand Down

0 comments on commit f982c25

Please sign in to comment.