fix(dialog-portal): set z-index to high value (#13004)
This commit is contained in:
parent
077a88a803
commit
297ab194a8
|
@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
import { IReduxState } from '../../../app/types';
|
import { IReduxState } from '../../../app/types';
|
||||||
|
import { ZINDEX_DIALOG_PORTAL } from '../../constants';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
|
@ -65,6 +66,7 @@ function DialogPortal({ children, className, style, getRef, setSize }: Props) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (portalTarget && getRef) {
|
if (portalTarget && getRef) {
|
||||||
getRef(portalTarget);
|
getRef(portalTarget);
|
||||||
|
portalTarget.style.zIndex = `${ZINDEX_DIALOG_PORTAL}`;
|
||||||
}
|
}
|
||||||
}, [ portalTarget ]);
|
}, [ portalTarget ]);
|
||||||
|
|
||||||
|
|
|
@ -38,3 +38,6 @@ export const NOTIFY_CLICK_MODE = {
|
||||||
ONLY_NOTIFY: 'ONLY_NOTIFY',
|
ONLY_NOTIFY: 'ONLY_NOTIFY',
|
||||||
PREVENT_AND_NOTIFY: 'PREVENT_AND_NOTIFY'
|
PREVENT_AND_NOTIFY: 'PREVENT_AND_NOTIFY'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Around 300 to be displayed above components like chat
|
||||||
|
export const ZINDEX_DIALOG_PORTAL = 300;
|
||||||
|
|
Loading…
Reference in New Issue