fix(accounts): hide no rows label when there is only pinned row (#4833)
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
This commit is contained in:
parent
0b1987d4ce
commit
5db3453ba5
@ -312,7 +312,6 @@ export const AccountTable = ({
|
||||
]);
|
||||
|
||||
const data = rowData?.filter((data) => data.asset.id !== pinnedAsset?.id);
|
||||
|
||||
return (
|
||||
<AgGrid
|
||||
{...props}
|
||||
@ -321,6 +320,13 @@ export const AccountTable = ({
|
||||
rowData={data}
|
||||
defaultColDef={defaultColDef}
|
||||
columnDefs={colDefs}
|
||||
overlayNoRowsTemplate={
|
||||
// account for the pinned asset is filtered out to prevent duplicate
|
||||
// data in the pinned row and the main table rows. AgGrid will not
|
||||
// consider the pinned row when determining whether to show the no
|
||||
// rows template or not so we need to override it
|
||||
rowData?.length ? '<span />' : props.overlayNoRowsTemplate
|
||||
}
|
||||
getRowHeight={getPinnedAssetRowHeight}
|
||||
pinnedTopRowData={pinnedRow ? [pinnedRow] : undefined}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user