Skip to content

Commit

Permalink
fix "1" not being a valid numeric value
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-luger committed Apr 22, 2024
1 parent 9b34173 commit 7ce4872
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -13,6 +13,7 @@ export function NumericalFilterElement(props: Props) {
function _onChange(values: NumberFormatValues) {
props.onChange(values.value || '')
}


return (
<NumericFormat
Expand All @@ -28,7 +29,7 @@ export function NumericalFilterElement(props: Props) {
}
let options = props.options?.options
if (options.length === 2 && !isNaN(+options[0]) && !isNaN(+options[1])) {
return value.floatValue > +options[0] && value.floatValue < +options[1]
return value.floatValue >= +options[0] && value.floatValue <= +options[1]
}
return true
}}
Expand Down

0 comments on commit 7ce4872

Please sign in to comment.