Skip to content

Commit

Permalink
Add rowHeightsOptions to main data grid docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Sep 30, 2021
1 parent 0f5a4f7 commit 55a1069
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src-docs/src/views/datagrid/datagrid_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
EuiDescriptionList,
EuiCodeBlock,
EuiText,
EuiLink,
EuiSpacer,
} from '../../../../src/components';

Expand Down Expand Up @@ -107,6 +108,14 @@ const gridSnippet = `
rowHover: 'highlight',
header: 'shade',
}}
// Optional. Allows configuring the heights of grid rows
rowHeightsOptions={{
defaultHeight: 34,
rowHeights: {
0: auto
},
lineHeight: '1em',
}}
// Optional. Provide additional schemas to use in the grid.
// This schema 'franchise' essentially acts like a boolean, looking for Star Wars or Star Trek in a column.
schemaDetectors={[
Expand Down Expand Up @@ -222,6 +231,20 @@ const gridConcepts = [
description:
'The total number of rows in the dataset (used by e.g. pagination to know how many pages to list).',
},
{
title: 'rowHeightsOptions',
description: (
<span>
Allows configuring both default and specific heights of grid rows.
Accepts a partial <strong>EuiDataGridRowHeightsOptions</strong> object.
See{' '}
<EuiLink href="/#/tabular-content/data-grid-row-heights-options">
Data grid row heights options
</EuiLink>{' '}
for more details and examples.
</span>
),
},
{
title: 'gridStyle',
description: (
Expand Down

0 comments on commit 55a1069

Please sign in to comment.