Make query fill options syntax consistent

pull/10616/head
Jared Scheib 2017-08-24 14:37:29 -07:00
parent 2137268516
commit 2aa2d09250
2 changed files with 9 additions and 5 deletions

View File

@ -3,8 +3,8 @@ import Dropdown from 'src/shared/components/Dropdown'
import {
QUERY_FILL_OPTIONS,
NUMBER,
NULL,
NUMBER,
} from 'src/shared/constants/queryFillOptions'
class FillQuery extends Component {
@ -23,7 +23,7 @@ class FillQuery extends Component {
}
handleDropdown = item => {
if (item.text === 'number') {
if (item.text === NUMBER) {
this.setState({selected: item.text}, () => {
this.props.onSelection(this.state.inputValue)
})

View File

@ -1,3 +1,7 @@
export const NULL = 'null'
export const NUMBER = 'number'
export const QUERY_FILL_OPTIONS = ['none', NULL, 'linear', 'previous', NUMBER]
export const LINEAR = '(linear)'
export const NONE = '(none)'
export const NULL = '(null)'
export const NUMBER = '(number)'
export const PREVIOUS = '(previous)'
export const QUERY_FILL_OPTIONS = [NULL, PREVIOUS, NUMBER, NONE, LINEAR]