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

onPopupClosed #32

Closed alinco8 closed 2 months ago

alinco8 commented 6 months ago

Is your feature request related to a problem? Please describe.

No way to get the value after the selection is done.

Describe the solution you'd like Please describe your desired solution clearly and concisely.

Add onPopupClosed to be called when the popup is closed. or onChangeComplete

Describe alternatives you've considered

None

Additional context

JaitenThomas commented 3 months ago

I've found a solution, when the popup is closed the input is focused, this means you can use the onFocus prop to set the value.

bbyuck commented 2 months ago

I solved this issue with PopoverProps.

here is example.

<MuiColorInput PopoverProps={{ onClose: () => { /* what you want to do */ } }} />

I think if reference document contains this use case, this library would be used more easily!