Added setFilter(), containerID and getFilter() to (#1360)

mock slice object in exploreV2

 - filter_box in exploreV2 was broken because containerID and
   getFilter() were not defined in the mock of slice object
This commit is contained in:
vera-liu 2016-11-03 21:14:08 -07:00 committed by GitHub
parent ea189790f1
commit 98afc3e590
1 changed files with 12 additions and 0 deletions

View File

@ -32,6 +32,8 @@ class ChartContainer extends React.Component {
getMockedSliceObject() {
return {
containerId: this.props.containerId,
jsonEndpoint: () => this.props.jsonEndpoint,
container: {
@ -62,6 +64,16 @@ class ChartContainer extends React.Component {
selector: this.state.selector,
setFilter: () => {
// set filter according to data in store
// used in FilterBox.onChange()
},
getFilters: () => (
// return filter objects from viz.formData
{}
),
done: () => {
// finished rendering callback
},