forked from ddrilling/asb_cloud_front
Добавлено отображение загрузки в WellTreeSelector
This commit is contained in:
parent
5ab2bf237f
commit
8f9383654d
@ -1,9 +1,8 @@
|
||||
import { Button, Drawer, Tree, TreeProps, Typography } from 'antd'
|
||||
import { Button, Drawer, Skeleton, Tree, TreeProps, Typography } from 'antd'
|
||||
import { DefaultValueType } from 'rc-tree-select/lib/interface'
|
||||
import { useState, useEffect, ReactNode, useCallback, memo, Key } from 'react'
|
||||
import { useNavigate, useLocation } from 'react-router-dom'
|
||||
|
||||
import SkeletonLoader from '@components/SkeletonLoader'
|
||||
import { WellIcon, WellIconState } from '@components/icons'
|
||||
import { invokeWebApiWrapperAsync } from '@components/factory'
|
||||
import { DepositService, DepositDto, WellDto } from '@api'
|
||||
@ -165,7 +164,7 @@ export const WellTreeSelector = memo(({ show, ...other }: TreeProps<TreeNodeData
|
||||
<Button loading={showLoader} onClick={() => setVisible(true)}>{value ?? 'Выберите месторождение'}</Button>
|
||||
<Drawer visible={visible} mask={false} onClose={() => setVisible(false)}>
|
||||
<Typography.Title level={3}>Список скважин</Typography.Title>
|
||||
<SkeletonLoader loading={showLoader} empty={!wellsTree || wellsTree.length <= 0}>
|
||||
<Skeleton active loading={showLoader}>
|
||||
<Tree
|
||||
{...other}
|
||||
showIcon
|
||||
@ -175,7 +174,7 @@ export const WellTreeSelector = memo(({ show, ...other }: TreeProps<TreeNodeData
|
||||
onExpand={setExpanded}
|
||||
expandedKeys={expanded}
|
||||
/>
|
||||
</SkeletonLoader>
|
||||
</Skeleton>
|
||||
</Drawer>
|
||||
</>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user