Returning value of button click in Modal #207
-
Hello, Thanks :-) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You should be able to listen in on the ruxmodalclosed event, which will return false if the user canceled or true if they accepted. Something like:
https://codesandbox.io/s/condescending-breeze-7c2dy?file=/src/App.js Does that work for you? We're also reworking Modal in 7.0 to use slots to give you more control over each piece of the Modal, but unfortunately that'll require a breaking change so we can't ship it immediately. |
Beta Was this translation helpful? Give feedback.
You should be able to listen in on the ruxmodalclosed event, which will return false if the user canceled or true if they accepted.
Something like:
https://codesandbox.io/s/condescending-breeze-7c2dy?file=/src/App.js
Does that work for you?
We're also reworking Modal in 7.0 to use slots to give you more control over each piece of the Modal, but unfortunately that'll require a breaking change so we ca…