Smart-Table
Smart-Table copied to clipboard
Smart-Table filtering and paging with CheckBoxes
Might be that I'm doing something wrong so would love to know how to solve this.
[http://plnkr.co/edit/SkISTVludkqhNvw9gBDN?p=preview] In this plunker, I have a checkbox that filters the data in the smart-table. I specify 10 items per page in my pagination. When de-select the comedy check box, the page filters out the 2 comedy titles on in the table but does not re-adjust the pages.
The way that I've implemented this, it simply removes the rows on each page vs recalculating the paging based on the filter.
Stuck... Any help would be appreciated.
Hello @devwheel,
i just took a quick look at you plunk. There are a few problems.
- The loaded Angular librarys have all different versions and you load two different angularjs versions. if you load AngularJs 1.6.6 the other core angular librarys need to have the same version. In your plunk you include angular-animate and angular-touch. Both of them are core angular librarys that need to match the angular version
- You filter the displayed data directly in ng-repeat with
filter:filterTypes.Therefore the pagination directive never knew that you played with the data. You need to use the stSearch directive on the checkboxes.