CB-3680 fix: add suspense loader (#1823)

Co-authored-by: dariamarutkina <125263541+dariamarutkina@users.noreply.github.com>
This commit is contained in:
Alexey
2023-07-16 20:31:43 +03:00
committed by GitHub
co-authored by dariamarutkina
parent ba0cd2d3fa
commit fc592908c2
@@ -12,6 +12,7 @@ import styled, { use } from 'reshadow';
import { EventContext } from '@cloudbeaver/core-events';
import { getComputed } from '../getComputed';
import { Loader } from '../Loader/Loader';
import { useObjectRef } from '../useObjectRef';
import { BASE_TABLE_STYLES } from './BASE_TABLE_STYLES';
import { EventTableItemSelectionFlag } from './EventTableItemSelectionFlag';
@@ -113,7 +114,9 @@ export const TableItem = observer<React.PropsWithChildren<Props>>(function Table
{isExpanded && ExpandElement && (
<tr {...use({ noHover: true, expanded: isExpanded })}>
<td colSpan={Children.toArray(children).length} {...use({ expandArea: true })}>
<ExpandElement item={item} />
<Loader suspense>
<ExpandElement item={item} />
</Loader>
</td>
</tr>
)}