public/be-assets/node_modules/@yaireo/tagify/dist/tagify.esm.js
/**
   * mark the currently active suggestion option
   * @param {Object}  elm            option DOM node
   * @param {Boolean} adjustScroll   when navigation with keyboard arrows (up/down), aut-scroll to always show the highlighted element
   */
mark the currently active suggestion option
@param {Object}  elm            option DOM node
@param {Boolean} adjustScroll   when navigation with keyboard arrows (up/down), aut-scroll to always show the highlighted element
mark the currently active suggestion option @param { Object } elm option DOM node @param { Boolean } adjustScroll when navigation with keyboard arrows ( up / down ) aut - scroll to always show the highlighted element
highlightOption(elm, adjustScroll) {
    var className = this.settings.classNames.dropdownItemActive,
        itemData; 
    if (this.state.ddItemElm) {
      this.state.ddItemElm.classList.remove(className);
      this.state.ddItemElm.removeAttribute("aria-selected");
    }
    if (!elm) {
      this.state.ddItemData = null;
      this.state.ddItemElm = null;
      this.input.autocomplete.suggest.call(this);
      return;
    }
    itemData = this.suggestedListItems[this.getNodeIndex(elm)];
    this.state.ddItemData = itemData;
    this.state.ddItemElm = elm; 
    elm.classList.add(className);
    elm.setAttribute("aria-selected", true);
    if (adjustScroll) elm.parentNode.scrollTop = elm.clientHeight + elm.offsetTop - elm.parentNode.clientHeight; 
    if (this.settings.autoComplete) {
      this.input.autocomplete.suggest.call(this, itemData);
      this.dropdown.position(); 
    }
  }
highlightOption ( elm , adjustScroll ) { var className = this . settings . classNames . dropdownItemActive , itemData ; if ( this . state . ddItemElm ) { this . state . ddItemElm . classList . remove ( className ) ; this . state . ddItemElm . removeAttribute ( "aria-selected" ) ; } if ( ! elm ) { this . state . ddItemData = null ; this . state . ddItemElm = null ; this . input . autocomplete . suggest . call ( this ) ; return ; } itemData = this . suggestedListItems [ this . getNodeIndex ( elm ) ] ; this . state . ddItemData = itemData ; this . state . ddItemElm = elm ; elm . classList . add ( className ) ; elm . setAttribute ( "aria-selected" , true ) ; if ( adjustScroll ) elm . parentNode . scrollTop = elm . clientHeight + elm . offsetTop - elm . parentNode . clientHeight ; if ( this . settings . autoComplete ) { this . input . autocomplete . suggest . call ( this , itemData ) ; this . dropdown . position ( ) ; } }
mark the currently active suggestion option
 @param {Object}  elm            option DOM node
 @param {Boolean} adjustScroll   when navigation with keyboard arrows (up/down), aut-scroll to always show the highlighted element
mark the currently active suggestion option @param { Object } elm option DOM node @param { Boolean } adjustScroll when navigation with keyboard arrows ( up / down ) aut - scroll to always show the highlighted element
// focus casues a bug in Firefox with the placeholder been shown on the input element // if( this.settings.dropdown.position != 'manual' ) //     elm.focus(); // this.DOM.dropdown.querySelectorAll("." + this.settings.classNames.dropdownItemActive).forEach(activeElm => activeElm.classList.remove(className)); // Try to autocomplete the typed value with the currently highlighted dropdown item // suggestions might alter the height of the tagify wrapper because of unkown suggested term length that could drop to the next line