esvit / ng-table

Simple table with sorting and filtering on AngularJS
http://esvit.github.io/ng-table
BSD 3-Clause "New" or "Revised" License
2.77k stars 851 forks source link

Load Filter options dynamically #1034

Open kunalwatkar opened 6 years ago

kunalwatkar commented 6 years ago

Hi,

I have multiSelect filter on my ng-table. My filter options are being populated from current dataset and on some conditions I load new dataset. Once I have a new dataset, I am able to see my new data in table. But my filter options are not populated.

I use filter-data directive to pass filter options (array from my controller), but I am not able to see new filter options on my page. Any idea how can I achieve it?

Here is my HTML/PUG view for td:

// Status
                            td.input-xxs.activity-status(
                                data-title="'Status'"
                                header-class="'activity-status'"
                                filter="{'company.status': 'select-multiple'}"
                                filter-data="aCtrl.statusFilterData"
                                sortable="'company.status'")
                                | [[aCtrl.setDisplayText(rec.company.status, aCtrl.opCompanyStatus)]]

Thanks.