Fixed: Filtering by IMDb decimal ratings

pull/10423/head v5.10.3.9178
Bogdan 2 months ago
parent 96e60906c5
commit 927e84654f

@ -56,7 +56,9 @@ function getValue(input, selectedFilterBuilderProp) {
}
if (selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER) {
return parseInt(input);
const { numberFractionDigits = 0 } = selectedFilterBuilderProp;
return Number(input).toFixed(numberFractionDigits);
}
return input;

@ -489,7 +489,8 @@ export const defaultState = {
{
name: 'imdbRating',
label: () => translate('ImdbRating'),
type: filterBuilderTypes.NUMBER
type: filterBuilderTypes.NUMBER,
numberFractionDigits: 1
},
{
name: 'rottenTomatoesRating',

Loading…
Cancel
Save