Skip to content

Commit

Permalink
[Inspector] Improve the display when there are many columns (#155119)
Browse files Browse the repository at this point in the history
## Summary

Fixes #112176

Improves the way the inspector table is rendered when there are multiple
columns. I just applied the eui team feedback

**Now**

<img width="1257" alt="image"
src="https://user-images.githubusercontent.com/17003240/232727448-561cd07a-84ec-472f-9968-27631ef9f4f1.png">


**Before**
<img width="875" alt="image"
src="https://user-images.githubusercontent.com/17003240/232727840-24514f38-0a6f-47a3-89ed-adc0bc7ea2f0.png">
  • Loading branch information
stratoula authored Apr 18, 2023
1 parent c76a68b commit dfbb97f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';

import { css } from '@emotion/react';
import {
EuiButtonIcon,
EuiFlexGroup,
Expand Down Expand Up @@ -192,12 +192,25 @@ export class DataTableFormat extends Component<DataTableFormatProps, DataTableFo

return (
<EuiInMemoryTable
className="insDataTableFormat__table"
tableLayout="auto"
className="insDataTableFormat__table eui-xScroll"
data-test-subj="inspectorTable"
columns={columns}
items={rows}
sorting={true}
pagination={pagination}
css={css`
// Set a min width on each column - you can use [data-test-subj] to target specific columns
.euiTableHeaderCell {
min-width: 100px;
}
// Make sure the pagination follows the scroll
> div:last-child {
position: sticky;
left: 0;
}
`}
/>
);
}
Expand Down

0 comments on commit dfbb97f

Please sign in to comment.