Skip to content

Commit

Permalink
fix: Provide a prop to set the focus on initial KLocationSearch render (
Browse files Browse the repository at this point in the history
close #1014)
  • Loading branch information
cnouguier committed Dec 11, 2024
1 parent 19ba7af commit 8de344e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions map/client/components/location/KLocationSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
id="location-search"
v-model="location"
:label="computedLabel"
:autofocus="autofocus"
clearable
use-input
hide-dropdown-icon
Expand Down Expand Up @@ -107,6 +108,10 @@ const props = defineProps({
type: Object,
default: () => null
},
autofocus: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
Expand Down
5 changes: 5 additions & 0 deletions map/client/components/tools/KSearchTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<KLocationSearch
v-model="location"
:geocoders="geocoders"
:autofocus="autofocus"
:style="computedStyle"
/>
</template>
Expand All @@ -24,6 +25,10 @@ defineProps({
geocoders: {
type: Array,
default: () => []
},
autofocus: {
type: Boolean,
default: false
}
})
Expand Down

0 comments on commit 8de344e

Please sign in to comment.