react-tournament-brackets icon indicating copy to clipboard operation
react-tournament-brackets copied to clipboard

Fixing Scores

Open thuynh opened this issue 8 months ago • 1 comments

What is the best way to fix a score in a single or double elimination bracket? The use case is an organizer enters the score but made a mistake. The team advances to the next round but need to fix the score for the correct team to advance instead.

thuynh avatar Apr 02 '25 13:04 thuynh

Doesn't sound like a relevant issue for this package.

This package will render whatever data you pass in so long as it matches the expected type that's defined in the .d.ts files shipped with the package.

Your issue sounds like you need to implement some fix on your backend (if your data isn't manually made) to adjust scoring with backwards revision over the subsequent matches to make sure the final modified brackets data is still cohesive and adds up.

Otherwise if you write the data by hand, I would try to isolate the matches that are affected, find them in the JSON object and rewrite those matches by hand to advance the correct team.

A simple swapping of teams would do it. Just remove one team and add another and the library should just render the new corrected bracket.

Good luck!

Shenato avatar Apr 07 '25 19:04 Shenato