Skip to content

Commit

Permalink
fix(autocomplete): typeahead and prevent submit on enter
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxcode committed Jul 11, 2024
1 parent 87e37d5 commit 4d39672
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/pages/inputs/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const schema
id: 'basic',
name: 'basic',
complete: search,
dropdown: true,
label: 'Basic AutoComplete - Use [h]ello',
},
{
Expand All @@ -22,7 +23,6 @@ const schema
name: 'chips',
multiple: true,
typeahead: false,
complete: search,
label: 'Chips Replacement',
},
]
Expand Down
3 changes: 2 additions & 1 deletion src/components/PrimeAutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ const styleClass = computed(() => (props.context?.state.validationVisible && !pr
:suggestions="suggestions"
:dropdown="context?.dropdown ?? false"
:multiple="context?.multiple ?? false"
:typeahead="context?.typeahead ?? true"
:typeahead="context?.attrs.typeahead ?? true"
:pt="context?.pt"
:pt-options="context?.ptOptions"
:unstyled="context?.unstyled ?? false"
@keydown.enter.prevent
@complete="search"
@change="handleInput"
@blur="handleBlur"
Expand Down

0 comments on commit 4d39672

Please sign in to comment.