This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 823f306 Call props.onChange only when closing filter (#4003)
823f306 is described below
commit 823f306f248f27b6976f7a69e47b773418d7d0d4
Author: Beto Dealmeida <[email protected]>
AuthorDate: Tue Dec 5 11:17:12 2017 -0800
Call props.onChange only when closing filter (#4003)
---
.../components/controls/DateFilterControl.jsx | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git
a/superset/assets/javascripts/explore/components/controls/DateFilterControl.jsx
b/superset/assets/javascripts/explore/components/controls/DateFilterControl.jsx
index 9e9ed46..eb35c01 100644
---
a/superset/assets/javascripts/explore/components/controls/DateFilterControl.jsx
+++
b/superset/assets/javascripts/explore/components/controls/DateFilterControl.jsx
@@ -63,17 +63,6 @@ export default class DateFilterControl extends
React.Component {
onNumberChange(event) {
this.setState({ num: event.target.value }, this.onChange);
}
- onChange() {
- let val;
- if (this.state.type === 'rel') {
- val = `${this.state.num} ${this.state.grain} ${this.state.rel}`;
- } else if (this.state.type === 'fix') {
- val = this.state.dttm;
- } else if (this.state.type === 'free') {
- val = this.state.free;
- }
- this.props.onChange(val);
- }
onFreeChange(event) {
this.setState({ free: event.target.value }, this.onChange);
}
@@ -88,6 +77,15 @@ export default class DateFilterControl extends
React.Component {
this.setState({ dttm: dttm.format().substring(0, 19) }, this.onChange);
}
close() {
+ let val;
+ if (this.state.type === 'rel') {
+ val = `${this.state.num} ${this.state.grain} ${this.state.rel}`;
+ } else if (this.state.type === 'fix') {
+ val = this.state.dttm;
+ } else if (this.state.type === 'free') {
+ val = this.state.free;
+ }
+ this.props.onChange(val);
this.refs.trigger.hide();
}
renderPopover() {
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].