Handle NumberFilter value when changing rule type.
This commit is contained in:
parent
38bb06d39b
commit
de53c50514
|
@ -77,9 +77,17 @@ class NumberFilter extends Component {
|
|||
return this.getRangeInput();
|
||||
}
|
||||
|
||||
let inputValue = value;
|
||||
|
||||
if ( value && value.indexOf( ',' ) > -1 ) {
|
||||
const [ moreThan, lessThan ] = value.split( ',' );
|
||||
inputValue = 'lessthan' === rule ? lessThan : moreThan;
|
||||
onFilterChange( filter.key, 'value', inputValue );
|
||||
}
|
||||
|
||||
return this.getFormControl(
|
||||
inputType,
|
||||
value,
|
||||
inputValue,
|
||||
partial( onFilterChange, filter.key, 'value' )
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue