Skip to content

Commit

Permalink
use durationOutputOptions for duration 'to' options
Browse files Browse the repository at this point in the history
  • Loading branch information
nreese committed May 30, 2018
1 parent 30b5393 commit d1c3a2d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import _ from 'lodash';
import {
EuiComboBox,
} from '@elastic/eui';
import { durationInputOptions } from './lib/durations';
import { durationOutputOptions, durationInputOptions } from './lib/durations';
const durationFormatTest = /[pnumshdwMY]+,[pnumshdwMY]+/;

class DataFormatPicker extends Component {
Expand Down Expand Up @@ -116,7 +116,7 @@ class DataFormatPicker extends Component {
const selectedFrom = durationInputOptions.find(option => {
return from === option.value;
});
const selectedTo = durationInputOptions.find(option => {
const selectedTo = durationOutputOptions.find(option => {
return to === option.value;
});
return (
Expand Down Expand Up @@ -147,7 +147,7 @@ class DataFormatPicker extends Component {
<div className="vis_editor__item">
<EuiComboBox
isClearable={false}
options={durationInputOptions}
options={durationOutputOptions}
selectedOptions={selectedTo ? [selectedTo] : []}
onChange={this.handleDurationChange('to')}
singleSelection={true}
Expand Down

0 comments on commit d1c3a2d

Please sign in to comment.