Open FatDoge opened 1 month ago
See the example here: https://opensource.ebay.com/nice-modal-react/#propsBinding
yes I saw it, but it needs to add additional ModalHolder and other code. If just use NiceModal.show(MyModal, { loading, onOk }), can it bind props?
Or why not provide a optional object like
NiceModal.show(MyModal, { loading, onOk }, { refreshDeps: [loading] })
Or why not provide a optional object like
NiceModal.show(MyModal, { loading, onOk }, { refreshDeps: [loading] })
Data binding can only be used in hooks or components.
I will send props.onOk, maybe async function, it will change loading status from false -> true -> false when user clicks button inside a modal. What I need is binding loading props and add loading style on clicked button, but I found it didn't work.