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