viclafouch / mui-color-input

📌 A color input designed for MUI (Material ui) V6 built with TinyColor
https://viclafouch.github.io/mui-color-input/
60 stars 20 forks source link

onPopoverClosed/onPopoverOpened props to improve performance #23

Closed devoren closed 10 months ago

devoren commented 10 months ago

Thank you for the awesome library ❤️!

Is your feature request related to a problem? Please describe. onChange calls on every color value change, so my another components re-renders when value changes

Describe the solution you'd like I would like there to be props like onPopoverClosed/onPopoverOpened and they would only change the value when the popover is closed, so instead of updating the value every time the color changes. This will help if you have multiple component states in one component. And I haven't found a better name yet. Or Can I listen to the popover's state?