Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion resources/js/components/inputs/relationship/Selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:sort-direction="sortDirection"
:additional-parameters="additionalParameters"
v-model:selections="selections"
@request-completed="focusSearchInput"
>
<template #initializing>
<div class="flex flex-1">
Expand All @@ -22,7 +23,7 @@
<div class="flex flex-1 flex-col gap-4 overflow-auto p-4">
<div class="flex items-center gap-2 sm:gap-3">
<div class="flex flex-1 items-center gap-2 sm:gap-3">
<Search />
<Search ref="search" />
<Filters v-if="filters && filters.length" />
</div>

Expand Down Expand Up @@ -316,6 +317,10 @@ export default {
// Try to get a meaningful title from common fields
return row.title || row.name || row.label || row.id || __('item');
},

focusSearchInput() {
this.$nextTick(() => this.$refs.search.focus());
},
},
};
</script>