Skip to content

Commit

Permalink
remove unnecessary nextTick
Browse files Browse the repository at this point in the history
  • Loading branch information
bellangerq committed Jul 25, 2024
1 parent 30c7468 commit bcead31
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { nextTick, ref } from "vue";
import { ref } from "vue";
import { useIsOffline } from "../../composables/useIsOffline";
import { FileErrorMessage } from "../../enums";
Expand Down Expand Up @@ -75,12 +75,12 @@ function onFileRequestFinished() {
const lazyAccordionRef = ref<InstanceType<typeof LazyAccordion>>();
const commentFieldRef = ref<HTMLTextAreaElement>();
// FIXME: avoid setTimeout()
async function disclose() {
const accordion = lazyAccordionRef.value?.accordionRef;
dsfr(accordion).accordionsGroup.members[0].disclose();
await nextTick();
// FIXME: avoid setTimeout()
setTimeout(() => {
commentFieldRef.value?.focus();
}, 10);
Expand Down

0 comments on commit bcead31

Please sign in to comment.