Skip to content

Commit

Permalink
fix: [DHIS2-18150] user has to click out of range filter for update b…
Browse files Browse the repository at this point in the history
…utton to trigger (#3855)

fix: user has to click out of range filter for update button to trigger
  • Loading branch information
alaa-yahia authored Nov 25, 2024
1 parent dd7b153 commit f70b205
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class NumericFilterPlain extends Component<Props> implements UpdatableFilterCont
this.props.onCommitValue(this.getUpdatedValue(value));
}

handleFieldChange = (value: {[key: string]: string}) => {
this.props.onCommitValue(this.getUpdatedValue(value));
}

setMaxD2TextFieldInstance = (instance: any) => {
this.maxD2TextFieldInstance = instance;
}
Expand Down Expand Up @@ -195,6 +199,7 @@ class NumericFilterPlain extends Component<Props> implements UpdatableFilterCont
errorClass={classes.error}
onBlur={this.handleFieldBlur}
onEnterKey={this.handleEnterKeyInMin}
onChange={this.handleFieldChange}
/>
</div>
<div
Expand All @@ -214,6 +219,7 @@ class NumericFilterPlain extends Component<Props> implements UpdatableFilterCont
onBlur={this.handleFieldBlur}
onEnterKey={this.handleEnterKeyInMax}
textFieldRef={this.setMaxD2TextFieldInstance}
onChange={this.handleFieldChange}
/>
</div>
</div>
Expand Down

0 comments on commit f70b205

Please sign in to comment.