mariuszfoltak / angular2-datatable

DataTable - Simple table component with sorting and pagination for Angular2
202 stars 182 forks source link

Table content filtering #55

Closed wachpwnski closed 8 years ago

wachpwnski commented 8 years ago

You should be able to have an input box that will filter the results in the table. This doesn't seem to come with angular2 out of the box, and might not be something that would be ideal to implement, but if it can be done easily it would make sense.

Table Untouched

let filterInput = ""; | Name | Age |

| John Doe | 30 | | Jane Doe | 29 |

Table Touched

let filterInput = "Ja"; | Name | Age |

| Jane Doe | 29 |

mariuszfoltak commented 8 years ago

You can filter data before you pass it to datatable. You can check how it works on main example, where I'm using pipe to filtering data.