-
Notifications
You must be signed in to change notification settings - Fork 699
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
Controlled Brush #577
Comments
Hey @hellosmithy 👋 thanks for the suggestion, I think there's definitely a use case for this! If not too complex to implement, it seems like we could have a dual controlled/uncontrolled component where you can optionally pass in the brush state as you say, but if you don't it will manage it on its own as it does now. Happy to review a PR or discuss implementation details more! 🙌 |
Yea that's my thoughts too. OK - I'll put together a PR then for you to review. |
I was looking for a way to control the Brush component by giving it a
The You have to specify the |
I have a use case for a brush that can be initialized with some state, more like a controlled component rather than an uncontrolled component (as it currently maintains it's own state).
For example on initial render there would already be a brushed area that the user can then drag to resize, rather than always starting from an un-brushed state.
I think this could be achieved by optionally passing in brush state rather than the brush managing it's own state. Is there appetite to support this use-case? I'm happy to submit a PR if so.
The text was updated successfully, but these errors were encountered: