Skip to content

Commit 55a1069

Browse files
committed
Add rowHeightsOptions to main data grid docs page
1 parent 0f5a4f7 commit 55a1069

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src-docs/src/views/datagrid/datagrid_example.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
EuiDescriptionList,
1010
EuiCodeBlock,
1111
EuiText,
12+
EuiLink,
1213
EuiSpacer,
1314
} from '../../../../src/components';
1415

@@ -107,6 +108,14 @@ const gridSnippet = `
107108
rowHover: 'highlight',
108109
header: 'shade',
109110
}}
111+
// Optional. Allows configuring the heights of grid rows
112+
rowHeightsOptions={{
113+
defaultHeight: 34,
114+
rowHeights: {
115+
0: auto
116+
},
117+
lineHeight: '1em',
118+
}}
110119
// Optional. Provide additional schemas to use in the grid.
111120
// This schema 'franchise' essentially acts like a boolean, looking for Star Wars or Star Trek in a column.
112121
schemaDetectors={[
@@ -222,6 +231,20 @@ const gridConcepts = [
222231
description:
223232
'The total number of rows in the dataset (used by e.g. pagination to know how many pages to list).',
224233
},
234+
{
235+
title: 'rowHeightsOptions',
236+
description: (
237+
<span>
238+
Allows configuring both default and specific heights of grid rows.
239+
Accepts a partial <strong>EuiDataGridRowHeightsOptions</strong> object.
240+
See{' '}
241+
<EuiLink href="/#/tabular-content/data-grid-row-heights-options">
242+
Data grid row heights options
243+
</EuiLink>{' '}
244+
for more details and examples.
245+
</span>
246+
),
247+
},
225248
{
226249
title: 'gridStyle',
227250
description: (

0 commit comments

Comments
 (0)