jquery-bracket
jquery-bracket copied to clipboard
Custom Team Ids
As far I can see the data-teamid are generated using an index sequence, would be possible to pass the team id from the backend? It will help to then save the correct id values in the database an correctly show the winners of the event in other views.
What I'm doing now is to save the winners using the team names but it could cause errors if two teams has the same name (which is possible in my system), so what is the best way to save the winners of the event using IDs from the backend?
Thanks for this great library!
Hi @teijo, any possible update here?
Hi, would the data customization support your needs: http://www.aropupu.fi/bracket/#customHandlers
Instead of using:
teams : [
["Team 1", "Team 2"],
...
]
You could use the following to pass custom data:
teams : [
[{name: "Team 1", backendId: 213}, {name: "Team 2", backendId: 36}],
...
]