-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add callback method from CustomSeed to Bracket #10
Comments
Hi buddy, thank you so much! |
Thanks, i know i can put an const onSeedClicked = () => {
setGlobal({
selectedMatch: m,
})
} and inside const [selectedMatch] = useGlobal('selectedMatch')
useEffect(() => {
//displaying games...
}, [selectedMatch]) Although i'm not very satisfied with this solution, feel free to close this issue |
This way it will end up passing onClick prop to CustomSeed coming from Bracket as well, which will end the same result, but ok i might add it in next release to help you more, Next release will be a breaking change from this one but its gonna take time to do. |
Imo @orieuxe |
Great library !
Use case : If one seed of the bracket is clicked, I would like to display the list of games attached to that match at the right of the page.
I couldn't find a way to pass a setter as prop from the
Bracket
to myCustomSeed
component.actual code :
<Bracket rounds={winnerRounds} renderSeedComponent={CustomSeed} />
what i idealy hoped for :) :
<Bracket rounds={winnerRounds} renderSeedComponent={CustomSeed} onSeedClick={(seed) => {}}/>
The text was updated successfully, but these errors were encountered: