|
|
@ -189,6 +189,13 @@ const toggleMenu = (e: Event) => { |
|
|
|
} |
|
|
|
} |
|
|
|
isOpen.value = editAllowed.value && !isOpen.value |
|
|
|
isOpen.value = editAllowed.value && !isOpen.value |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// prevent propagation of keydown event if select is open |
|
|
|
|
|
|
|
const onKeydown = (e: KeyboardEvent) => { |
|
|
|
|
|
|
|
if (isOpen.value && (active.value || editable.value)) { |
|
|
|
|
|
|
|
e.stopPropagation() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -206,7 +213,7 @@ const toggleMenu = (e: Event) => { |
|
|
|
:dropdown-class-name="`nc-dropdown-single-select-cell ${isOpen ? 'active' : ''}`" |
|
|
|
:dropdown-class-name="`nc-dropdown-single-select-cell ${isOpen ? 'active' : ''}`" |
|
|
|
:show-search="isOpen && (active || editable)" |
|
|
|
:show-search="isOpen && (active || editable)" |
|
|
|
@select="isOpen = false" |
|
|
|
@select="isOpen = false" |
|
|
|
@keydown.stop |
|
|
|
@keydown="onKeydown($event)" |
|
|
|
@search="search" |
|
|
|
@search="search" |
|
|
|
> |
|
|
|
> |
|
|
|
<a-select-option |
|
|
|
<a-select-option |
|
|
|