Skip to content

Commit ed53e3c

Browse files
committed
fix(FR-552): can not reopen vfolder createion modal in session launcher (#3199)
resolves #3198 (FR-552) User cannot reopen vfolder creation modal after closing in session launcher. To fix added Suspense boundary with Skeleton loading state to the StorageSelect component in the folder creation modal. This also improves the user experience by showing a loading indicator while the storage selection component is being loaded.
1 parent 6f583d4 commit ed53e3c

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

react/src/components/FolderCreateModal.tsx

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ import BAIModal, { BAIModalProps } from './BAIModal';
77
import Flex from './Flex';
88
import ProjectSelect from './ProjectSelect';
99
import StorageSelect from './StorageSelect';
10-
import { App, Button, Divider, Form, Input, Radio, Switch, theme } from 'antd';
10+
import {
11+
App,
12+
Button,
13+
Divider,
14+
Form,
15+
Input,
16+
Radio,
17+
Skeleton,
18+
Switch,
19+
theme,
20+
} from 'antd';
1121
import { createStyles } from 'antd-style';
1222
import { FormInstance } from 'antd/lib';
1323
import _ from 'lodash';
@@ -216,14 +226,16 @@ const FolderCreateModal: React.FC<FolderCreateModalProps> = ({
216226
<Divider />
217227

218228
<Form.Item label={t('data.Host')} name={'host'}>
219-
<StorageSelect
220-
onChange={(value) => {
221-
formRef.current?.setFieldValue('host', value);
222-
}}
223-
showUsageStatus
224-
autoSelectType="usage"
225-
showSearch
226-
/>
229+
<Suspense fallback={<Skeleton.Input active />}>
230+
<StorageSelect
231+
onChange={(value) => {
232+
formRef.current?.setFieldValue('host', value);
233+
}}
234+
showUsageStatus
235+
autoSelectType="usage"
236+
showSearch
237+
/>
238+
</Suspense>
227239
</Form.Item>
228240
<Divider />
229241

0 commit comments

Comments
 (0)