Skip to content

Commit bf197d2

Browse files
committed
fix: review
1 parent fbd835d commit bf197d2

File tree

5 files changed

+6
-14
lines changed

5 files changed

+6
-14
lines changed

src/components/Table/Table.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
.ydb-table {
44
$block: &;
55
--ydb-table-cell-height: 40px;
6-
width: 100%;
7-
height: 100%;
86
&__table-header-content {
97
display: inline-flex;
108
align-items: center;

src/components/Table/Table.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const block = cn('ydb-table');
99

1010
interface TableProps<TData> extends BaseTableProps<TData> {
1111
width?: 'max' | 'auto';
12+
wrapperClassName?: string;
1213
}
1314

1415
interface ColumnHeaderProps {
@@ -20,9 +21,9 @@ export function ColumnHeader({children, className}: ColumnHeaderProps) {
2021
return <div className={block('table-header-content', className)}>{children}</div>;
2122
}
2223

23-
export function Table<TData>({className, width, ...props}: TableProps<TData>) {
24+
export function Table<TData>({className, width, wrapperClassName, ...props}: TableProps<TData>) {
2425
return (
25-
<div className={block()}>
26+
<div className={block(null, wrapperClassName)}>
2627
<BaseTable
2728
headerCellClassName={({column}) => {
2829
const align = column.columnDef.meta?.align;

src/containers/Tablet/components/TabletStorageInfo/TabletStorageInfo.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,5 @@ export function TabletStorageInfo({data}: TabletStorageInfoProps) {
3030
expanded,
3131
},
3232
});
33-
return (
34-
<div>
35-
<Table table={table} />
36-
</div>
37-
);
33+
return <Table table={table} />;
3834
}

src/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/SimplifiedPlan.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
$block: &;
55
overflow: auto;
66

7+
width: 100%;
78
height: 100%;
89
padding: 0 15px 15px;
910

src/containers/Tenant/Query/QueryResult/components/SimplifiedPlan/SimplifiedPlan.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,5 @@ export function SimplifiedPlan({plan}: SimplifiedPlanProps) {
108108
columnResizeMode: 'onChange',
109109
});
110110

111-
return (
112-
<div className={block()}>
113-
<Table table={table} stickyHeader width="max" />
114-
</div>
115-
);
111+
return <Table wrapperClassName={block()} table={table} stickyHeader width="max" />;
116112
}

0 commit comments

Comments
 (0)