Fix search bar behaviour (step 4)
This commit is contained in:
parent
99372fdfe8
commit
c1ddbd1f3f
@ -24,7 +24,7 @@
|
|||||||
<button
|
<button
|
||||||
v-if="modelValue && showList && showClearButton"
|
v-if="modelValue && showList && showClearButton"
|
||||||
class="btn-clear"
|
class="btn-clear"
|
||||||
@click="clearSearch"
|
@click.stop="clearSearch"
|
||||||
>
|
>
|
||||||
<i class="fas fa-times"></i>
|
<i class="fas fa-times"></i>
|
||||||
</button>
|
</button>
|
||||||
@ -292,6 +292,14 @@ const clearSearch = () => {
|
|||||||
|
|
||||||
emit('update:modelValue', '');
|
emit('update:modelValue', '');
|
||||||
emit('clear');
|
emit('clear');
|
||||||
|
|
||||||
|
// Focus the search input after clearing
|
||||||
|
nextTick(() => {
|
||||||
|
const searchInput = document.querySelector('.search-input');
|
||||||
|
if (searchInput) {
|
||||||
|
searchInput.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Select a VM
|
// Select a VM
|
||||||
|
Loading…
x
Reference in New Issue
Block a user