fix: temp fix for showing peek view modal for edgeless (#7155)
workaround for AFF-1200
This commit is contained in:
@@ -63,9 +63,11 @@ export const PeekViewModalContainer = ({
|
|||||||
target,
|
target,
|
||||||
controls,
|
controls,
|
||||||
children,
|
children,
|
||||||
|
hideOnEntering,
|
||||||
onAnimateEnd,
|
onAnimateEnd,
|
||||||
}: PropsWithChildren<{
|
}: PropsWithChildren<{
|
||||||
open: boolean;
|
open: boolean;
|
||||||
|
hideOnEntering?: boolean;
|
||||||
target?: HTMLElement;
|
target?: HTMLElement;
|
||||||
onOpenChange: (open: boolean) => void;
|
onOpenChange: (open: boolean) => void;
|
||||||
controls: React.ReactNode;
|
controls: React.ReactNode;
|
||||||
@@ -113,7 +115,7 @@ export const PeekViewModalContainer = ({
|
|||||||
className={styles.modalContent}
|
className={styles.modalContent}
|
||||||
data-state={status}
|
data-state={status}
|
||||||
>
|
>
|
||||||
{children}
|
{hideOnEntering && status === 'entering' ? null : children}
|
||||||
</Dialog.Content>
|
</Dialog.Content>
|
||||||
<div data-state={status} className={styles.modalControls}>
|
<div data-state={status} className={styles.modalControls}>
|
||||||
{controls}
|
{controls}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ export const PeekViewManagerModal = () => {
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
controls={controls}
|
controls={controls}
|
||||||
|
// there is a bug for edgeless mode when showing the peek view during start up animation
|
||||||
|
hideOnEntering={activePeekView?.info.mode === 'edgeless'}
|
||||||
onOpenChange={open => {
|
onOpenChange={open => {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
peekViewEntity.close();
|
peekViewEntity.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user