1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-27 10:19:59 +00:00

Always focus the search field after results have been fetched

Close #948

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-11-26 09:23:41 +01:00
parent 22550a60e9
commit 566d84b957
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -18,6 +18,7 @@
icon="magnify"
type="search"
id="search"
ref="autocompleteSearchInput"
:value="search"
@input="debouncedUpdateSearchQuery"
dir="auto"
@ -276,6 +277,9 @@ const GEOHASH_DEPTH = 9; // put enough accuracy, radius will be used anyway
update(data) {
this.searchEvents = data.searchEvents;
this.searchGroups = data.searchGroups;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.$refs.autocompleteSearchInput?.focus();
},
},
currentUser: CURRENT_USER_CLIENT,
@ -362,6 +366,7 @@ export default class Search extends Vue {
$refs!: {
aac: FullAddressAutoComplete;
autocompleteSearchInput: any;
};
data(): Record<string, unknown> {