We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38bdc25 commit bde2cd5Copy full SHA for bde2cd5
src/Select.vue
@@ -234,8 +234,10 @@ const handleNavigation = (e: KeyboardEvent) => {
234
search.value = "";
235
}
236
237
+ const hasSelectedValue = props.isMulti ? (selected.value as OptionValue[]).length > 0 : !!selected.value;
238
+
239
// When pressing backspace with no search, remove the last selected option.
- if (e.key === "Backspace" && search.value.length === 0 && selected.value.length > 0) {
240
+ if (e.key === "Backspace" && search.value.length === 0 && hasSelectedValue) {
241
e.preventDefault();
242
243
if (props.isMulti) {
0 commit comments