diff --git a/src/components/Grid.tsx b/src/components/Grid.tsx index 1123b0e4..b8a4d287 100644 --- a/src/components/Grid.tsx +++ b/src/components/Grid.tsx @@ -53,6 +53,7 @@ export interface GridProps { */ selectColumnPinned?: ColDef["pinned"]; noRowsOverlayText?: string; + noRowsMatchingOverlayText?: string; animateRows?: boolean; rowHeight?: number; rowClassRules?: GridOptions["rowClassRules"]; @@ -716,6 +717,7 @@ export const Grid = ({ headerRowHeight={headerRowCount * rowHeight} filteredRowCount={event.api.getDisplayedRowCount()} noRowsOverlayText={params.noRowsOverlayText} + noRowsMatchingOverlayText={params.noRowsMatchingOverlayText} /> ); }} diff --git a/src/components/GridNoRowsOverlay.tsx b/src/components/GridNoRowsOverlay.tsx index 741447e6..f5c74415 100644 --- a/src/components/GridNoRowsOverlay.tsx +++ b/src/components/GridNoRowsOverlay.tsx @@ -24,12 +24,14 @@ export interface GridNoRowsOverlayProps { rowCount: number | undefined | null; filteredRowCount: number; noRowsOverlayText: string | undefined; + noRowsMatchingOverlayText: string | undefined; headerRowHeight: number; } export const GridNoRowsOverlay = (props: GridNoRowsOverlayProps) => { if (props.loading) return ; if (props.rowCount === 0) return
{props.noRowsOverlayText ?? "There are currently no rows"}
; - if (props.filteredRowCount === 0) return
All rows have been filtered
; + if (props.filteredRowCount === 0) + return
{props.noRowsMatchingOverlayText ?? "All rows have been filtered"}
; return ; }; diff --git a/src/styles/GridTheme.scss b/src/styles/GridTheme.scss index 7c4de7f4..ac8278a4 100644 --- a/src/styles/GridTheme.scss +++ b/src/styles/GridTheme.scss @@ -288,7 +288,11 @@ $grid-base-font-size: calc(#{lui.$base-font-size} - 1px); font-size: 14px; } - .ag-row .ag-cell[aria-colindex="1"] { + .ag-row .ag-cell:first-of-type { padding-left: 32px; } + + .ag-row .ag-cell:last-of-type { + padding-right: 32px; + } }