Filtering data in one table by clicking on a row in another
Filtering data in one table by clicking on a row in another
noob123
Posts: 3Questions: 1Answers: 0
I have two AngularJS DataTables displayed. First one with counties and second with towns. So, what I need to do is filter data in second table by clicking a row in first table. For example, when I click on row with Orange County in first table, in second should be filtered only tawns from that county, not other ones. Any suggestions and pointers on how to do that would be highly appreciated.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Where does the data come from for both tables?
What I would do is wiring a click handler on the row to retrieve/refresh the data for the second table. Something like this:
I have two controllers, in first i reach data from county table and in second i reach for towns data from towns table. Then I display them both in same HTML page, in two separate div tags. One div using first controller, and another using second controller. I suppose I should first somehow enable transfering data from one controller to another.
Thank you this worked :)