External Data Source for Custom Filter
External Data Source for Custom Filter
Link to test case: https://jsfiddle.net/BeerusDev/n06greay/33/
Description of problem:
Hello,
I have the data object populating to the table and I am using rowGroup to group by Team. I have an external data source that isn't populating to the table, but I want to use it to help create a certain filter. I have another variable currentUser
which in my actual application is a dynamic value. In this case, the current user is "Player 6", and in the teamData Player 6 is in "Team 2". So I would want the filter to only show results of trainings for Team 2.
This question has an accepted answers - jump to answer
Answers
When you set
currentUser
to a value,Player 6
for example, you will need to loop throughteamData
to find the team number then set a variable,currentTeam
for example that is used in the search plugin to filter the rows. See this example:https://jsfiddle.net/1f9tqday/
Since its a Javascript exercise I'll leave it to you to write the code in
getTeam()
to loop through your data structure. Currently its hard codes to returnTeam 2
.Kevin
@kthorngren thanks for your input, I ended up with the following:
Fiddle: https://jsfiddle.net/BeerusDev/yebonhL7/36/