[explorev2] fix textfield and druid bug (#1732)

* Fixed bug with textfield being empty

* Only return time grains for sqla table
This commit is contained in:
vera-liu
2016-12-05 09:51:59 -08:00
committed by GitHub
parent abd0974897
commit 76aa9f7e10
2 changed files with 12 additions and 7 deletions

View File

@@ -96,7 +96,8 @@ export const exploreReducer = function (state, action) {
if (action.key === 'viz_type') {
newFormData.previous_viz_type = state.viz.form_data.viz_type;
}
newFormData[action.key] = action.value ? action.value : (!state.viz.form_data[action.key]);
newFormData[action.key] = (action.value !== undefined)
? action.value : (!state.viz.form_data[action.key]);
return Object.assign(
{},
state,