src/components/ebay-combobox-readonly/index.js
function handleOptionClick(event) {
    let el;

    // find the element with the data
    // start with the target element
    if (event.target.dataset.optionValue) {
        el = event.target;
    // check up the tree one level (in case option text or status was clicked)
    } else if (event.target.parentNode.dataset.optionValue) {
        el = event.target.parentNode;
    }

    this.processAfterStateChange(el);
    this.expander.collapse();
    this.el.querySelector(comboboxHostSelector).focus();
}
function handleOptionClick(event) {
    let el;

    // find the element with the data
    // start with the target element
    if (event.target.dataset.optionValue) {
        el = event.target;
    // check up the tree one level (in case option text or status was clicked)
    } else if (event.target.parentNode.dataset.optionValue) {
        el = event.target.parentNode;
    }

    this.processAfterStateChange(el);
    this.expander.collapse();
    this.el.querySelector(comboboxHostSelector).focus();
}
function handleOptionClick ( event ) { let el ; // find the element with the data // start with the target element if ( event . target . dataset . optionValue ) { el = event . target ; // check up the tree one level (in case option text or status was clicked) } else if ( event . target . parentNode . dataset . optionValue ) { el = event . target . parentNode ; } this . processAfterStateChange ( el ) ; this . expander . collapse ( ) ; this . el . querySelector ( comboboxHostSelector ) . focus ( ) ; }
Handle mouse click for option
@param {MouseEvent} event
Handle mouse click for option