Make query fill options syntax consistent
parent
2137268516
commit
2aa2d09250
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue