Datatable Component now supports Column Filters

Multiple people have asked for the ability to allow the user to filter the results being displayed in the datatable component. My most recent update to the LWC datatable component includes the ability to specify any or all columns to support the entry of a filter value by clicking on the column header. An additional attribute has been added to specify whether or not the filter values should be an exact upper/lower case match or not.

0 0 vote
Article Rating
Subscribe
Notify of
guest
6 Comments
Inline Feedbacks
View all comments
Josh Dayment
Josh Dayment
1 month ago

This is awesome are you going to be updating the source code?

Josh Dayment
Josh Dayment
1 month ago
Reply to  Eric Smith

Awesome Thanks!

Dan
Dan
1 month ago

This is AWESOME!!!! Great work. This component is game changing. It’d be super cool if you could also specify the filter values that can be selected to make the user experience even more seamless.

Dan
Dan
1 month ago
Reply to  Eric Smith

Hi Eric –

That is exactly what I’m thinking. For instance it’d be awesome if I could feed through a list of picklist values dynamically as well as hard code the filter values that can be selected. I think it’d also be great to have the option to either allow users to enter their own filter or to only allow the pre selected values to be selected.

Also, out of curiosity, for data fields can you use relative filters?

Thanks!
Dan