Fix DataGrid JSX nesting

This commit is contained in:
Mike Cao
2026-05-14 23:00:49 -07:00
parent 5306413bdb
commit c99ab3102d
+10 -11
View File
@@ -127,22 +127,21 @@ export function DataGrid({
renderEmpty={renderEmpty} renderEmpty={renderEmpty}
> >
{data && ( {data && (
<div <div
style={{ style={{
display: 'grid', display: 'grid',
gridTemplateColumns: 'minmax(0, 1fr)', gridTemplateColumns: 'minmax(0, 1fr)',
overflowX: 'auto', overflowX: 'auto',
}} }}
> >
<Column> <Column>
{isValidElement(child) {isValidElement(child)
? cloneElement(child as ReactElement<any>, { displayMode }) ? cloneElement(child as ReactElement<any>, { displayMode })
: child} : child}
</Column> </Column>
</div> </div>
)} )}
</LoadingPanel> </LoadingPanel>
</Column>
{showPager && ( {showPager && (
<Row marginTop="4"> <Row marginTop="4">
<Pager <Pager