Skip to content

Commit

Permalink
nit #209
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Feb 27, 2025
1 parent 578b342 commit d5777e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { nextTick, ref, watch, onMounted } from "vue";
import { nextTick, ref, watch, onMounted, useTemplateRef } from "vue";
import { useGettext } from "vue3-gettext";
import { useRouter } from "vue-router";
Expand Down Expand Up @@ -30,9 +30,7 @@ interface Props {
}
const props = defineProps<Props>();
const autoCompleteInstance = ref<InstanceType<typeof AutoComplete> | null>(
null,
);
const autoCompleteInstance = useTemplateRef("autoCompleteInstance");
const autoCompleteKey = ref(0);
const computedSearchResultsHeight = ref("");
const isLoading = ref(false);
Expand Down Expand Up @@ -94,6 +92,7 @@ const fetchData = async (searchTerm: string, items: number, page: number) => {
const focusInput = () => {
if (autoCompleteInstance.value) {
// @ts-expect-error - autoCompleteInstance is mistyped in PrimeVue
autoCompleteInstance.value.$el.querySelector("input").focus();
}
};
Expand All @@ -104,6 +103,7 @@ const keepOverlayVisible = () => {
searchResults.value.length &&
isLoading.value === isLoadingAdditionalResults.value
) {
// @ts-expect-error - autoCompleteInstance is mistyped in PrimeVue
nextTick(() => autoCompleteInstance.value?.show());
}
};
Expand Down Expand Up @@ -220,6 +220,7 @@ watch(searchResults, (searchResults) => {
}"
@complete="
() => {
// @ts-expect-error - autoCompleteInstance is mistyped in PrimeVue
autoCompleteInstance?.hide();
fetchData(query, props.searchResultsPerPage, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion arches_lingo/src/arches_lingo/pages/SchemePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function closeEditor() {
}
function openEditor(componentName: string, tileId?: string) {
closeEditor();
editorPanelKey.value += 1;
selectedComponentDatum.value = componentData.value.find(
(componentDatum) => {
Expand Down

0 comments on commit d5777e5

Please sign in to comment.