Our blazing fast Grid component built with pure JavaScript


Post by vconstruct »

I have used renderer to return true/false values as yes/no.
It worked fine but when I am trying to filter the column using Yes/No it is not showing any data. Filter is still working with true/false only.

How can I achieve that? How can I filter with rendered values?
I have used renderer to one of the column

renderer({ value }) {
        return value === true ? 'Yes' : 'No';
      },
 
Attachments
rendererfilter.mp4
(1.77 MiB) Downloaded 23 times

Post by tasnim »

Hello,

It worked fine but when I am trying to filter the column using Yes/No it is not showing any data. Filter is still working with true/false only.

Filter always applies the filter in the store. And the store has the data that you've set, and it has true and false values (value : true) But it doesn't have the values as Yes or No (value : 'Yes'). So that's why you're only able to filter with true and false

https://bryntum.com/products/grid/docs/api/Core/data/Store#function-filter

How can I achieve that? How can I filter with rendered values?

You cannot filter the rendered values. If you want to filter by Yes or No then you need to set the data value : 'Yes' or value : 'No'


Post Reply