code: function processAfterStateChange(itemIndexes) {
      const itemIndex = itemIndexes[(itemIndexes.length - 1)];
      const itemEl = this.itemEls[itemIndex];
  
      // enforce single selection on radio items
      if (this.state.isRadio) {
          this.state.items.forEach((eachItem, i) => {
              if (i !== itemIndex) {
                  eachItem.checked = false;
              }
          });
      }
  
      if (this.state.isRadio || this.state.isCheckbox) {
          elementScroll.scroll(itemEl);
      }
  
      if (this.state.isCheckbox && itemIndexes.length > 1) {
          // only calling via API can have multiple item indexes
          this.setState('checked', this.getCheckedList());
          emitAndFire(this, 'menu-change', { indexes: itemIndexes, checked: this.getCheckedList(), el: null });
      } else if (this.state.isCheckbox) {
          this.setState('checked', this.getCheckedList());
          emitAndFire(this, 'menu-change', { index: itemIndex, checked: this.getCheckedList(), el: itemEl });
      } else if (this.state.isRadio) {
          this.setState('checked', itemIndex);
          emitAndFire(this, 'menu-change', { index: itemIndex, checked: [itemIndex], el: itemEl });
      } else {
          this.setState('checked', itemIndex);
          emitAndFire(this, 'menu-select', { index: itemIndex, checked: [itemIndex], el: itemEl });
      }
  }
docs: Common processing after data change via both UI and API
  @param {Array} itemIndexes