Skip to content

Commit

Permalink
chore: remove useless colSpan & rowSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Oct 30, 2019
1 parent 725f745 commit 61d6132
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 133 deletions.
4 changes: 2 additions & 2 deletions src/Cell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ function Cell<RecordType extends DefaultRecordType>(
const componentProps = {
title,
...additionalProps,
colSpan: mergedColSpan,
rowSpan: mergedRowSpan,
colSpan: mergedColSpan && mergedColSpan !== 1 ? mergedColSpan : null,
rowSpan: mergedRowSpan && mergedRowSpan !== 1 ? mergedRowSpan : null,
className: classNames(
cellPrefixCls,
className,
Expand Down
12 changes: 0 additions & 12 deletions tests/__snapshots__/ExpandRow.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,21 @@ exports[`Table.Expand renders fixed column correctly 1`] = `
<tr>
<th
class="rc-table-cell rc-table-row-expand-icon-cell rc-table-cell-fix-left"
colspan="1"
rowspan="1"
style="position: sticky; left: 0px;"
/>
<th
class="rc-table-cell rc-table-cell-fix-left rc-table-cell-fix-left-last"
colspan="1"
rowspan="1"
style="position: sticky; left: 0px;"
>
Name
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
Age
</th>
<th
class="rc-table-cell rc-table-cell-fix-right rc-table-cell-fix-right-first"
colspan="1"
rowspan="1"
style="position: sticky; right: 0px;"
>
Gender
Expand Down Expand Up @@ -169,15 +161,11 @@ exports[`Table.Expand renders tree row correctly 1`] = `
<tr>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
Name
</th>
<th
class="rc-table-cell"
colspan="1"
rowspan="1"
>
Age
</th>
Expand Down
Loading

1 comment on commit 61d6132

@vercel
Copy link

@vercel vercel bot commented on 61d6132 Oct 30, 2019

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.