src/mixins/multipleSelection.js
/**
     * Select range of tags using the shiftKey
     */
Select range of tags using the shiftKey
Select range of tags using the shiftKey
selectTagsPressingShift() {
      if (this.initTagIndex !== null) {
        if (this.shiftKey && !this.metaKey) {
          if (this.initTagIndex < this.focusedTagIndex) {
            this.selectRangeActiveTags(this.initTagIndex, this.focusedTagIndex + 1);
          } else {
            this.selectRangeActiveTags(this.focusedTagIndex, this.initTagIndex + 1);
          }
        }
      }
    }
selectTagsPressingShift ( ) { if ( this . initTagIndex !== null ) { if ( this . shiftKey && ! this . metaKey ) { if ( this . initTagIndex < this . focusedTagIndex ) { this . selectRangeActiveTags ( this . initTagIndex , this . focusedTagIndex + 1 ) ; } else { this . selectRangeActiveTags ( this . focusedTagIndex , this . initTagIndex + 1 ) ; } } } }
Select range of tags using the shiftKey
Select range of tags using the shiftKey
// If the user has selected a tag to init the shift selection // Select the whole range between the init tag index and the focused tag index // Comparing initTagIndex and focusedTagIndex to know which direction the slice // function has