From 8dfdcdf39dc56581e1e8abe2f05b7cdfa6bd86a1 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Thu, 19 Dec 2024 12:20:33 +1100 Subject: [PATCH] fix(@dpc-sdp/ripple-ui-forms): always set searchInput focus --- .../src/components/RplFormDropdown/RplFormDropdown.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ripple-ui-forms/src/components/RplFormDropdown/RplFormDropdown.vue b/packages/ripple-ui-forms/src/components/RplFormDropdown/RplFormDropdown.vue index b9c1081b5..5151d19ca 100644 --- a/packages/ripple-ui-forms/src/components/RplFormDropdown/RplFormDropdown.vue +++ b/packages/ripple-ui-forms/src/components/RplFormDropdown/RplFormDropdown.vue @@ -241,9 +241,8 @@ const handleSearchUpdate = (event: Event) => { } } -const handleSearchBlur = () => { - searchFocused.value = false -} +const handleSearchFocus = () => (searchFocused.value = true) +const handleSearchBlur = () => (searchFocused.value = false) watch( () => props.value, @@ -600,6 +599,7 @@ const hasValue = computed((): boolean => { autocomplete="off" @keydown.enter.prevent="handleSearchSubmit" @keydown.left.stop="handleSearchLeft" + @focus="handleSearchFocus" @blur="handleSearchBlur" @input="handleSearchUpdate" />