[@mantine/modals] update modal props #1719
Replies: 6 comments 1 reply
-
async confirm is good, possible to impl? |
Beta Was this translation helpful? Give feedback.
-
actual, any ideas? how update confirm button props async |
Beta Was this translation helpful? Give feedback.
-
Any updates on this for the core? Being able to update the cancel/confirm buttons based on a state (async loading) is a very common use case. |
Beta Was this translation helpful? Give feedback.
-
+1 @rtivital |
Beta Was this translation helpful? Give feedback.
-
https://mantine.dev/x/modals/#dynamic-content-and-the-modals-manager |
Beta Was this translation helpful? Give feedback.
-
Updating the modal state is a relatively common requirement, for example, to perform a delete operation when the confirm button is clicked, the
loading
state of the confirm button needs to be updated and the closing of the modal should be prevented if an error occurs.Or you can make
onConfirm
support returnpromise
, automatically handle theloading
state, and prevent the modal from closing if it returnsreject
Beta Was this translation helpful? Give feedback.
All reactions