Skip to content

Commit

Permalink
feat(table): fix table empty style error (#3552)
Browse files Browse the repository at this point in the history
* Update Table.tsx

#3421

* fix table style error

Co-authored-by: chenshuai2144 <[email protected]>
  • Loading branch information
super20155 and chenshuai2144 authored Sep 9, 2021
1 parent 1fb9c35 commit 05ab05a
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 141 deletions.
4 changes: 0 additions & 4 deletions packages/table/src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,10 @@ function TableRender<T extends Record<string, any>, U, ValueType>(
) : (
<Card
bordered={isBordered('table', cardBordered)}
style={{
height: '100%',
}}
bodyStyle={
toolbarDom
? {
paddingTop: 0,
paddingBottom: 0,
}
: {
padding: 0,
Expand Down
1 change: 0 additions & 1 deletion tests/__snapshots__/doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ Array [
</div>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
Expand Down
1 change: 0 additions & 1 deletion tests/form/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -32672,7 +32672,6 @@ exports[`form demos πŸ“Έ renders ./packages/form/src/demos/pro-form-editableTabl
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
Expand Down
1 change: 0 additions & 1 deletion tests/layout/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,6 @@ exports[`layout demos πŸ“Έ renders ./packages/layout/src/components/WaterMark/de
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
Expand Down
33 changes: 11 additions & 22 deletions tests/list/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/base.tsx correctly 1`
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -626,11 +625,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/card-list.tsx correct
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -1598,11 +1596,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/editable.tsx correctl
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -2064,11 +2061,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/expand.tsx correctly
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -2582,11 +2578,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/filter.tsx correctly
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -3570,11 +3565,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/layout.tsx correctly
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -4356,11 +4350,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/pagination.tsx correc
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -5558,11 +5551,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/search.tsx correctly
</div>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -6360,11 +6352,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/selectedRow.tsx corre
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -7120,11 +7111,10 @@ Array [
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down Expand Up @@ -7639,11 +7629,10 @@ exports[`list demos πŸ“Έ renders ./packages/list/src/demos/special.tsx correctly
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-pro-table-list-toolbar"
Expand Down
6 changes: 2 additions & 4 deletions tests/list/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ exports[`List 🚏 only has content 1`] = `
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-list ant-list-split ant-pro-list-container"
Expand Down Expand Up @@ -61,11 +60,10 @@ exports[`List 🚏 only has description 1`] = `
>
<div
class="ant-card"
style="height: 100%;"
>
<div
class="ant-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="ant-list ant-list-split ant-pro-list-container"
Expand Down
3 changes: 1 addition & 2 deletions tests/table/__snapshots__/column.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,10 @@ exports[`Table ColumnSetting 🎏 config provide render 1`] = `
</div>
<div
class="qixian-card"
style="height: 100%;"
>
<div
class="qixian-card-body"
style="padding-top: 0px; padding-bottom: 0px;"
style="padding-top: 0px;"
>
<div
class="qixian-pro-table-list-toolbar"
Expand Down
Loading

0 comments on commit 05ab05a

Please sign in to comment.