fix(core): workpace list blink issue on open (#5400)
This commit is contained in:
@@ -30,7 +30,7 @@ import { useAsyncCallback } from '@toeverything/hooks/affine-async-hooks';
|
|||||||
import { useAtom, useAtomValue } from 'jotai';
|
import { useAtom, useAtomValue } from 'jotai';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import type { HTMLAttributes, ReactElement } from 'react';
|
import type { HTMLAttributes, ReactElement } from 'react';
|
||||||
import { forwardRef, useCallback, useEffect, useMemo } from 'react';
|
import { forwardRef, Suspense, useCallback, useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
import { openWorkspaceListModalAtom } from '../../atoms';
|
import { openWorkspaceListModalAtom } from '../../atoms';
|
||||||
import { useHistoryAtom } from '../../atoms/history';
|
import { useHistoryAtom } from '../../atoms/history';
|
||||||
@@ -218,7 +218,11 @@ export const RootAppSidebar = ({
|
|||||||
rootOptions={{
|
rootOptions={{
|
||||||
open: openUserWorkspaceList,
|
open: openUserWorkspaceList,
|
||||||
}}
|
}}
|
||||||
items={<UserWithWorkspaceList onEventEnd={closeUserWorkspaceList} />}
|
items={
|
||||||
|
<Suspense>
|
||||||
|
<UserWithWorkspaceList onEventEnd={closeUserWorkspaceList} />
|
||||||
|
</Suspense>
|
||||||
|
}
|
||||||
contentOptions={{
|
contentOptions={{
|
||||||
// hide trigger
|
// hide trigger
|
||||||
sideOffset: -58,
|
sideOffset: -58,
|
||||||
|
|||||||
Reference in New Issue
Block a user