Skip to content

Commit

Permalink
fix(table): fix table style (#1640)
Browse files Browse the repository at this point in the history
Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed Dec 8, 2021
1 parent 10ff33b commit 0018d49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useMemo, forwardRef, createContext, useCallback, useRef } from 'react';
import GioTable from '@gio-design/table';
import classNames from 'classnames';
import { cloneDeep, get, has, set, isFunction, isNil } from 'lodash';
import { cloneDeep, get, has, set, isFunction, isNil, isEmpty } from 'lodash';
import { ExpandableConfig } from '@gio-design/table/lib/interface';
import { compose } from 'lodash/fp';
import { RightOutlined, DownOutlined } from '@gio-design/icons';
Expand Down Expand Up @@ -223,6 +223,7 @@ function Table<RecordType>(props: TableProps<RecordType>, ref: React.ForwardedRe
<div
className={classNames(`${prefixCls}-wrapper`, className, {
[`${prefixCls}-showHover`]: showHover,
[`${prefixCls}-is-empty`]: isEmpty(paginationData),
})}
style={{ ...style, '--table-cell-padding': padding }}
ref={mergedRef}
Expand Down
9 changes: 9 additions & 0 deletions src/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,15 @@
}
}

.@{table-prefix-cls}-wrapper.@{table-prefix-cls}-is-empty .@{table-prefix-cls}-expanded-row-fixed {
&::after {
content: none;
}
&::before {
content: none;
}
}

.table-size(@size, @padding: 12px 16px) {
.@{table-prefix-cls}.@{table-prefix-cls}-@{size} {
.@{table-prefix-cls}-title,
Expand Down

1 comment on commit 0018d49

@vercel
Copy link

@vercel vercel bot commented on 0018d49 Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.