src/mixins/multipleSelection.js
/**
     * Handles clicking or hitting enter on a focused tag.
     * @param {Event} value
     */
Handles clicking or hitting enter on a focused tag.
@param {Event} value
Handles clicking or hitting enter on a focused tag . @param { Event } value
handleSingleTagClick({ event, tagName }) {
      if (this.keyboardIsVirtual) {
        if (!this.debouncedHandleDeleteTag) {
          this.debouncedHandleDeleteTag = debounce(this.handleDeleteTag, DebounceDelay);
        }
        this.debouncedHandleDeleteTag({ tagName, event });
      } else {
        this.assignEventValues(event);
        this.metaKeyClickSelection(event, tagName);
        this.multipleTagsSelectionHandler({ event, tagName });
      }
    }
handleSingleTagClick ( { event , tagName } ) { if ( this . keyboardIsVirtual ) { if ( ! this . debouncedHandleDeleteTag ) { this . debouncedHandleDeleteTag = debounce ( this . handleDeleteTag , DebounceDelay ) ; } this . debouncedHandleDeleteTag ( { tagName , event } ) ; } else { this . assignEventValues ( event ) ; this . metaKeyClickSelection ( event , tagName ) ; this . multipleTagsSelectionHandler ( { event , tagName } ) ; } }
Handles clicking or hitting enter on a focused tag.
Handles clicking or hitting enter on a focused tag .
// init debounce function // remove the tag if it's on mobile // and prevent handleDeleteTag to be called too fast