Reputation: 668
Is there a way to customize the filtering logic in ReactDataGrid.io?
My use case is that I store amounts as integers, but before displaying them, I divide them by 100 and format them as currency. For example, 12599
is displayed as 125,99 kr
.
The problem arises when using the amount filter. Users naturally filter based on the displayed number (e.g., 125,99
), but no results are found because the actual stored value is 12599
. The same issue occurs with range filters; entering 300
yields no results because 12599
is greater than 300
. I want to modify the NumberFilter
to accommodate this.
Is defining my own Filter Editor the only solution, or is there a way to transform the values input in the filter or the values against which the filter is applied?
Upvotes: 0
Views: 37