Fix search bar behaviour (step 4)
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user