1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix VirtualList styling in logs

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-06-30 14:19:40 +03:00
parent 09503e8d6d
commit 503439d9d7
3 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@
.VirtualList {
height: 100%;
.list {
.listElement {
overflow-x: scroll!important;
.LogRow {

View File

@ -262,6 +262,7 @@ export class LogList extends React.Component<Props> {
outerRef={this.virtualListDiv}
ref={this.virtualListRef}
className="box grow"
listClassName="listElement"
/>
{this.isJumpButtonVisible && (
<JumpToBottom onClick={this.scrollToBottom} />

View File

@ -44,6 +44,7 @@ interface Props<T extends ItemObject = any> {
getRow?: (uid: string | number) => React.ReactElement<any>;
onScroll?: (props: ListOnScrollProps) => void;
outerRef?: React.Ref<any>
listClassName?: string;
}
interface State {
@ -95,7 +96,7 @@ export class VirtualList extends Component<Props, State> {
};
render() {
const { width, className, items, getRow, onScroll, outerRef } = this.props;
const { width, className, items, getRow, onScroll, outerRef, listClassName } = this.props;
const { overscanCount } = this.state;
const rowData: RowData = {
items,
@ -107,7 +108,7 @@ export class VirtualList extends Component<Props, State> {
<AutoSizer disableWidth>
{({ height }) => (
<VariableSizeList
className={styles.list}
className={cssNames(styles.list, listClassName)}
width={width}
height={height}
itemSize={this.getItemSize}