Skip to content

Commit

Permalink
Misc existing documentation fixes
Browse files Browse the repository at this point in the history
- Fix awkward grammar which was tweaked in another spot in the docs

- fix defaultHeight snippet example that was missing a closing brace (change it to static #, since I added a lineCount example already earlier in the page)

- fix redundant =
  • Loading branch information
cee-chen committed Sep 28, 2021
1 parent 299f64c commit 0f16968
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,16 @@ const rowHeightsSnippet = `rowHeightsOptions = {
defaultHeight: 140, // default every row to 140px
rowHeights: {
1: {
lineCount: 5, // for row which have index 1 we allow to show 5 lines after that we truncate
lineCount: 5, // row at index 1 will show 5 lines
},
4: 200, // for row which have index 4 we set 140 pixel
4: 200, // row at index 4 will adjust the height to 200px
5: 80,
},
}`;

const rowHeightsFullSnippet = `const rowHeightsOptions = useMemo(
() => ({
defaultHeight: {
lineCount: 2,
defaultHeight: 140,
}),
[]
);
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/row_height_auto.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const RenderCellValue: EuiDataGridProps['renderCellValue'] = ({
content = <EuiMarkdownFormat>{item.body ?? ''}</EuiMarkdownFormat>;
} else {
// a full issue description is a *lot* to shove into a cell
content = content = (
content = (
<EuiMarkdownFormat textSize="relative">
{(item.body ?? '').slice(0, 300)}
</EuiMarkdownFormat>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/datagrid/row_height_fixed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const RenderCellValue: EuiDataGridProps['renderCellValue'] = ({
content = <EuiMarkdownFormat>{item.body ?? ''}</EuiMarkdownFormat>;
} else {
// a full issue description is a *lot* to shove into a cell
content = content = (
content = (
<EuiMarkdownFormat textSize="relative">
{(item.body ?? '').slice(0, 300)}
</EuiMarkdownFormat>
Expand Down

0 comments on commit 0f16968

Please sign in to comment.