Skip to content

Commit

Permalink
Fix exec modifier to exact
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonL9vov committed Apr 12, 2024
1 parent ea64494 commit 0b34ada
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-hive-ui-kit",
"private": false,
"version": "0.7.12",
"version": "0.7.13",
"type": "module",
"description": "UI kit for Vue 3",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/components/hive-drop-down/hive-drop-down.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ defineExpose({ current });
@focusin="expand(), onFocusin(emit)"
@focusout="collapse(), onFocusout(emit)"
@keydown="onKeydown(emit, $event)"
@keydown.enter.exec="updateCurrentValue(activeValue), onUpdateModelValue<Value>(emit, activeValue)"
@keydown.enter.exact="updateCurrentValue(activeValue), onUpdateModelValue<Value>(emit, activeValue)"
@keydown.esc="collapse()"
@keydown.up.prevent="setPrevActiveValue"
@keydown.down.prevent="setNextActiveValue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const computedPlaceholder = computed(() =>
const handleKeydown = (event: KeyboardEvent) => {
onKeydown(emit, event);
if ((props.keysToEnterValue && props.keysToEnterValue.includes(event.key)) || event.key === 'Enter') {
if (props.keysToEnterValue && props.keysToEnterValue.includes(event.key)) {
changeValue(activeValue.value ?? searchQuery.value);
}
if (event.key !== 'ArrowDown' && event.key !== 'ArrowUp') {
Expand Down Expand Up @@ -223,6 +223,7 @@ const handleKeydown = (event: KeyboardEvent) => {
@focusin="expand(), onFocusin(emit)"
@focusout="collapse(), onFocusout(emit)"
@keydown="handleKeydown"
@keydown.enter.exact="changeValue(activeValue ?? searchQuery)"
@keydown.esc="collapse()"
@keydown.up.prevent="setPrevActiveValue"
@keydown.down.prevent="setNextActiveValue"
Expand Down
2 changes: 1 addition & 1 deletion src/components/hive-multiselect/hive-multiselect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ onMounted(() => {
@focusin="expand(), onFocusin(emit)"
@focusout="collapse(), onFocusout(emit)"
@keydown="onKeydown(emit, $event)"
@keydown.enter.exec="changeValue(activeValue)"
@keydown.enter.exact="changeValue(activeValue)"
@keydown.esc="collapse()"
@keydown.up.prevent="setPrevActiveValue"
@keydown.down.prevent="setNextActiveValue"
Expand Down

0 comments on commit 0b34ada

Please sign in to comment.