From 103b634b27826796b073ab2e7229dcfa43fde364 Mon Sep 17 00:00:00 2001 From: alaa-yahia Date: Wed, 23 Oct 2024 13:10:51 +0300 Subject: [PATCH] fix: user has to click out of range filter for update button to trigger --- .../FiltersForTypes/Numeric/NumericFilter.component.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core_modules/capture-core/components/FiltersForTypes/Numeric/NumericFilter.component.js b/src/core_modules/capture-core/components/FiltersForTypes/Numeric/NumericFilter.component.js index 4450e1a539..7b9c48ba89 100644 --- a/src/core_modules/capture-core/components/FiltersForTypes/Numeric/NumericFilter.component.js +++ b/src/core_modules/capture-core/components/FiltersForTypes/Numeric/NumericFilter.component.js @@ -153,6 +153,10 @@ class NumericFilterPlain extends Component 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; } @@ -195,6 +199,7 @@ class NumericFilterPlain extends Component implements UpdatableFilterCont errorClass={classes.error} onBlur={this.handleFieldBlur} onEnterKey={this.handleEnterKeyInMin} + onChange={this.handleFieldChange} />
implements UpdatableFilterCont onBlur={this.handleFieldBlur} onEnterKey={this.handleEnterKeyInMax} textFieldRef={this.setMaxD2TextFieldInstance} + onChange={this.handleFieldChange} />