daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 519 forks source link

Added a Filter that can search by column #306

Open SMxJrz opened 8 years ago

SMxJrz commented 8 years ago

First off: Great table, I really love the look and feel, and it has worked great for me so far.

So I generally have had needs to be able to filter by column for my applications and I noticed that this library doesn't really have that out of the box. The beautiful thing about this library is the control i have over the Dataset with the filtering and orderBy. I had originally wrote this as a custom filter inside of the apps i had used the table in, but I had noticed that it's pretty much the same code every time i need it in an app, I feel like the filter is generic enough so I had the idea of just adding it as a filter in this library.

The general idea is that it's still up to the user to provide the interface for filtering but now they can reference this filter and hook up their inputs to it. The filter just requires an object that maps the columns to the filter (easy enough if you define the columns object like the example app)

This filter is case insensitive with regards to the data in each column. I have also updated the demo app to use the filter, you can see how it works there, What do you think?

-SM

P.S. - I think this would address #283 but they are probably looking for a full-on magic UI feature but I think the users should design their filter ui's the way they want it to look and feel

kood1 commented 8 years ago

+1

rhllor commented 8 years ago

+1

datenbrille commented 8 years ago

+1

marcincichocki commented 8 years ago

+1

flick36 commented 8 years ago

+1

JaySardhara commented 8 years ago

+1

gss-patricia commented 8 years ago

+1

nish-nair commented 8 years ago

+1

jpirela commented 8 years ago

+1

kevinbatongbakal commented 7 years ago

+1

veneliniliev commented 7 years ago

+1

skortchmark9 commented 7 years ago

Is there a demo of this anywhere?