-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
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
const DesktopMenu = loadable(
() => import('src/entities/menu').then((mod) => mod.DesktopMenu),
{
ssr: false,
}
);
const DesktopMenuWithProps = NiceModal.create(DesktopMenu);
const registar = () => {
NiceModal.register('desktop-menu', DesktopMenuWithProps, {
defaultVisible: true,
});
};
export const ModalProvider: React.FC = ({ children }) => {
registar();
return <NiceModal.Provider>{children}</NiceModal.Provider>;
};
al-petrov
Metadata
Metadata
Assignees
Labels
No labels