Skip to content
Snippets Groups Projects
Commit 275706de authored by Tom Robinson's avatar Tom Robinson Committed by Allen Gilliland
Browse files

Default date/time field unit to 'day' if time grouping is enabled

parent fcf6ae33
Branches
Tags
No related merge requests found
......@@ -179,6 +179,11 @@ export default class FieldList extends Component {
onChange(item) {
if (item.segment) {
this.props.onFilterChange(item.value);
} else if (this.itemIsSelected(item)) {
// ensure if we select the same item we don't reset datetime_field's unit
this.props.onFieldChange(this.props.field);
} else if (this.props.enableTimeGrouping && isDate(item.field)) {
this.props.onFieldChange(["datetime_field", item.value, "as", "day"]);
} else {
this.props.onFieldChange(item.value);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment