Open Staskasnz opened 3 months ago
defaultVisible
is only useful with declarative way: <MyNiceModal defaultVisible .../>
Also, register
is expected to be called only once for a modal, don't use it inside a component.
However, to make a modal default visible, you can also use NiceModal.show
after registration.
defaultVisible
is only useful with declarative way:<MyNiceModal defaultVisible .../>
Also,
register
is expected to be called only once for a modal, don't use it inside a component.However, to make a modal default visible, you can also use
NiceModal.show
after registration.
@supnate I don't know how to use defaultVisible
in any NiceModal
api,can you provide an example for modal default open scene? It seems that because I haven't manually execute the modal.show()
, so modal has not mounted at all.
Hello, I can’t seem to pass the "true" value in defaultVisible to a created and registered modal window, how can I do this correctly? Typescript suggests exactly this method, but no matter how hard I try, I can’t pass the defaultVisible value