Skip to content

Commit

Permalink
[REVERT] Demo example
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jan 10, 2022
1 parent d4f7bfb commit 196fe66
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src-docs/src/views/datagrid/styling.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ const DataGrid = () => {
toolbarConfig = toolbarVisibilityOptions;
}

const [rowHeight, setRowHeight] = useState();
const setRowHeightAuto = () => setRowHeight('auto');

return (
<div>
<EuiFlexGroup gutterSize="s">
Expand Down Expand Up @@ -705,6 +708,11 @@ const DataGrid = () => {
</div>
</EuiPopover>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButton size="s" onClick={setRowHeightAuto}>
[TEST] Set row height to auto
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>

{footerSelected === 'striped' ? (
Expand Down Expand Up @@ -738,6 +746,7 @@ const DataGrid = () => {
header: headerSelected,
footer: footerSelected,
}}
rowHeightsOptions={{ defaultHeight: rowHeight }}
toolbarVisibility={toolbarConfig}
renderCellValue={({ rowIndex, columnId }) => data[rowIndex][columnId]}
renderFooterCellValue={renderFooterCellValue}
Expand Down

0 comments on commit 196fe66

Please sign in to comment.