[Vuejs]-Focus inputs inside vuetify expansion panels

0👍

It seems you have to use setTimeout to wait until the <v-expansion-panel-content> completes its transition.

Example:

...
  handleNext(index, refInput) {
    if (this.openedPanel === index) {
      this.$refs[refInput].focus();
    } else {
      this.openPanel(index);
      setTimeout(() => {
        this.$refs[refInput].focus();
      }, 350); // by default vuetify use 300ms for transition
    }
  }
...

JSFiddle

Leave a comment