function onQuestionAnswered(question) {
        var this$1 = this;

        if (question.isValid()) {
          this.$emit('answer', question.question);

          if (this.activeQuestionIndex < this.questionListActivePath.length) {
            ++this.activeQuestionIndex;
          }
         
          this.$nextTick(function () {
            this$1.reverse = false;

            this$1.setQuestions();
            this$1.checkTimer();
            // Nested $nextTick so we're 100% sure that setQuestions
            // actually updated the question array
            this$1.$nextTick(function () {
              var q = this$1.activeQuestionComponent();

              if (q) {
                q.focusField();
                this$1.activeQuestionIndex = q.question.index;
              } else if (this$1.isOnLastStep) {
                // No more questions left - set "completed" to true
                this$1.completed = true;
                this$1.activeQuestionIndex = this$1.questionListActivePath.length;
                
                this$1.$refs.button && this$1.$refs.button.focus();
              }

              this$1.$emit('step', this$1.activeQuestionId, this$1.activeQuestion);
            });
          });
        } else if (this.completed) {
          this.completed = false;
        }
      }
/**
       * Triggered by the "answer" event in the Question component
       */
Triggered by the "answer" event in the Question component
Triggered by the " answer " event in the Question component
function onQuestionAnswered(question) {
        var this$1 = this;
        if (question.isValid()) {
          this.$emit('answer', question.question);
          if (this.activeQuestionIndex < this.questionListActivePath.length) {
            ++this.activeQuestionIndex;
          }
          this.$nextTick(function () {
            this$1.reverse = false;
            this$1.setQuestions();
            this$1.checkTimer();
            this$1.$nextTick(function () {
              var q = this$1.activeQuestionComponent();
              if (q) {
                q.focusField();
                this$1.activeQuestionIndex = q.question.index;
              } else if (this$1.isOnLastStep) {
                this$1.completed = true;
                this$1.activeQuestionIndex = this$1.questionListActivePath.length;
                this$1.$refs.button && this$1.$refs.button.focus();
              }
              this$1.$emit('step', this$1.activeQuestionId, this$1.activeQuestion);
            });
          });
        } else if (this.completed) {
          this.completed = false;
        }
      }
function onQuestionAnswered ( question ) { var this$1 = this ; if ( question . isValid ( ) ) { this . $emit ( 'answer' , question . question ) ; if ( this . activeQuestionIndex < this . questionListActivePath . length ) { ++ this . activeQuestionIndex ; } this . $nextTick ( function ( ) { this$1 . reverse = false ; this$1 . setQuestions ( ) ; this$1 . checkTimer ( ) ; this$1 . $nextTick ( function ( ) { var q = this$1 . activeQuestionComponent ( ) ; if ( q ) { q . focusField ( ) ; this$1 . activeQuestionIndex = q . question . index ; } else if ( this$1 . isOnLastStep ) { this$1 . completed = true ; this$1 . activeQuestionIndex = this$1 . questionListActivePath . length ; this$1 . $refs . button && this$1 . $refs . button . focus ( ) ; } this$1 . $emit ( 'step' , this$1 . activeQuestionId , this$1 . activeQuestion ) ; } ) ; } ) ; } else if ( this . completed ) { this . completed = false ; } }
Triggered by the "answer" event in the Question component
Triggered by the " answer " event in the Question component
// Nested $nextTick so we're 100% sure that setQuestions // actually updated the question array // No more questions left - set "completed" to true