function indicatorDismissHandler(e) {

  if ($(e.currentTarget).data('dismiss') || e.type === 'hide') {
    let indexOption;
    const selectValues = $indicatorTypeSelect.val();

    // get dismissed indicator index
    for (let i = 0; i < selectValues.length; i++) {
      const value = selectValues[i];
      if (!app.state.indicators.find(item => item.type === value)) {
        indexOption = i;
        break;
      }
    }

    // remove indicator from select values
    selectValues.splice(indexOption, 1);

    // set new values for indicators select
    $indicatorTypeSelect.val(selectValues);
    $indicatorTypeSelect.selectpicker('render');
  }
}
/**
 * remove selected class, if indicator not added
 * @param {Object} e event object
 */
remove selected class, if indicator not added
@param {Object} e event object
remove selected class if indicator not added @param { Object } e event object
function indicatorDismissHandler(e) {
  if ($(e.currentTarget).data('dismiss') || e.type === 'hide') {
    let indexOption;
    const selectValues = $indicatorTypeSelect.val();
    for (let i = 0; i < selectValues.length; i++) {
      const value = selectValues[i];
      if (!app.state.indicators.find(item => item.type === value)) {
        indexOption = i;
        break;
      }
    }
    selectValues.splice(indexOption, 1);
    $indicatorTypeSelect.val(selectValues);
    $indicatorTypeSelect.selectpicker('render');
  }
}
function indicatorDismissHandler ( e ) { if ( $ ( e . currentTarget ) . data ( 'dismiss' ) || e . type === 'hide' ) { let indexOption ; const selectValues = $indicatorTypeSelect . val ( ) ; for ( let i = 0 ; i < selectValues . length ; i ++ ) { const value = selectValues [ i ] ; if ( ! app . state . indicators . find ( item => item . type === value ) ) { indexOption = i ; break ; } } selectValues . splice ( indexOption , 1 ) ; $indicatorTypeSelect . val ( selectValues ) ; $indicatorTypeSelect . selectpicker ( 'render' ) ; } }
remove selected class, if indicator not added
 @param {Object} e event object
remove selected class if indicator not added @param { Object } e event object
// get dismissed indicator index // remove indicator from select values // set new values for indicators select