render()

in public/pages/CreateMonitor/containers/MonitorIndex/MonitorIndex.js [218:273]


  render() {
    const {
      isLoading,
      allIndices,
      partialMatchedIndices,
      exactMatchedIndices,
      allAliases,
      partialMatchedAliases,
      exactMatchedAliases,
    } = this.state;

    const { visibleOptions } = getMatchedOptions(
      allIndices, //all indices
      partialMatchedIndices,
      exactMatchedIndices,
      allAliases,
      partialMatchedAliases,
      exactMatchedAliases,
      false //isIncludingSystemIndices
    );

    return (
      <FormikComboBox
        name="index"
        formRow
        fieldProps={{ validate: validateIndex }}
        rowProps={{
          label: 'Index',
          helpText:
            'You can use a * as a wildcard or date math index resolution in your index pattern',
          isInvalid,
          error: hasError,
          style: { paddingLeft: '10px' },
        }}
        inputProps={{
          placeholder: 'Select indices',
          async: true,
          isLoading,
          options: visibleOptions,
          onBlur: (e, field, form) => {
            form.setFieldTouched('index', true);
          },
          onChange: (options, field, form) => {
            form.setFieldValue('index', options);
          },
          onCreateOption: (value, field, form) => {
            this.onCreateOption(value, field.value, form.setFieldValue);
          },
          onSearchChange: this.onSearchChange,
          renderOption: this.renderOption,
          isClearable: true,
          'data-test-subj': 'indicesComboBox',
        }}
      />
    );
  }