Better solution with the old and new modals
This commit is contained in:
parent
13feceb289
commit
256ba92f7e
1 changed files with 11 additions and 1 deletions
|
@ -18,6 +18,7 @@ import {LogCategory, logError} from "tc-shared/log";
|
||||||
import {Registry} from "tc-events";
|
import {Registry} from "tc-events";
|
||||||
import {guid} from "tc-shared/crypto/uid";
|
import {guid} from "tc-shared/crypto/uid";
|
||||||
import {ErrorBoundary} from "tc-shared/ui/react-elements/ErrorBoundary";
|
import {ErrorBoundary} from "tc-shared/ui/react-elements/ErrorBoundary";
|
||||||
|
import ReactDOM from "react-dom";
|
||||||
|
|
||||||
class InternalRendererInstance extends React.PureComponent<{
|
class InternalRendererInstance extends React.PureComponent<{
|
||||||
instance: InternalModalInstance,
|
instance: InternalModalInstance,
|
||||||
|
@ -250,6 +251,15 @@ class InternalModalHookInner extends React.PureComponent<{}, {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
export const InternalModalHook = React.memo(() => (
|
export const InternalModalHook = React.memo(() => (
|
||||||
<InternalModalHookInner ref={internalModalContainer} />
|
<InternalModalHookInner ref={internalModalContainer} />
|
||||||
));
|
));
|
||||||
|
*/
|
||||||
|
export const InternalModalHook = React.memo(() => {
|
||||||
|
/* FIXME: This is only a temporary solution but if we don't do like this we'll mess up stacking of modals! */
|
||||||
|
return ReactDOM.createPortal(
|
||||||
|
<InternalModalHookInner ref={internalModalContainer} />,
|
||||||
|
document.body
|
||||||
|
);
|
||||||
|
});
|
Loading…
Add table
Reference in a new issue