Browse Source

update docs & table version (#20892)

pull/20896/head
二货机器人 5 years ago
committed by GitHub
parent
commit
d231d24300
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      components/table/__tests__/__snapshots__/Table.expand.test.js.snap
  2. 20
      components/table/__tests__/__snapshots__/Table.filter.test.js.snap
  3. 6
      components/table/__tests__/__snapshots__/Table.pagination.test.js.snap
  4. 12
      components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap
  5. 1
      components/table/__tests__/__snapshots__/Table.sorter.test.js.snap
  6. 2
      components/table/__tests__/__snapshots__/Table.test.js.snap
  7. 176
      components/table/__tests__/__snapshots__/demo.test.js.snap
  8. 16
      components/transfer/__tests__/__snapshots__/demo.test.js.snap
  9. 1
      docs/react/migration-v4.en-US.md
  10. 1
      docs/react/migration-v4.zh-CN.md
  11. 2
      package.json

3
components/table/__tests__/__snapshots__/Table.expand.test.js.snap

@ -39,6 +39,7 @@ exports[`Table.expand click to expand 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-cell-with-append"
@ -56,6 +57,7 @@ exports[`Table.expand click to expand 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-1"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-cell-with-append"
@ -192,6 +194,7 @@ exports[`Table.expand should support expandIconColumnIndex 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-cell-with-append"

20
components/table/__tests__/__snapshots__/Table.filter.test.js.snap

@ -108,6 +108,7 @@ exports[`Table.filter renders custom filter icon as string correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -117,6 +118,7 @@ exports[`Table.filter renders custom filter icon as string correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -126,6 +128,7 @@ exports[`Table.filter renders custom filter icon as string correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -135,6 +138,7 @@ exports[`Table.filter renders custom filter icon as string correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"
@ -250,6 +254,7 @@ exports[`Table.filter renders custom filter icon with right Tooltip title 1`] =
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -259,6 +264,7 @@ exports[`Table.filter renders custom filter icon with right Tooltip title 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -268,6 +274,7 @@ exports[`Table.filter renders custom filter icon with right Tooltip title 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -277,6 +284,7 @@ exports[`Table.filter renders custom filter icon with right Tooltip title 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"
@ -371,6 +379,7 @@ exports[`Table.filter renders filter correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -380,6 +389,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -389,6 +399,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -398,6 +409,7 @@ exports[`Table.filter renders filter correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"
@ -784,6 +796,7 @@ exports[`Table.filter should support getPopupContainer 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -793,6 +806,7 @@ exports[`Table.filter should support getPopupContainer 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -802,6 +816,7 @@ exports[`Table.filter should support getPopupContainer 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -811,6 +826,7 @@ exports[`Table.filter should support getPopupContainer 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"
@ -1005,6 +1021,7 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -1014,6 +1031,7 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -1023,6 +1041,7 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -1032,6 +1051,7 @@ exports[`Table.filter should support getPopupContainer from ConfigProvider 1`] =
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"

6
components/table/__tests__/__snapshots__/Table.pagination.test.js.snap

@ -39,6 +39,7 @@ exports[`Table.pagination Accepts pagination as true 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -48,6 +49,7 @@ exports[`Table.pagination Accepts pagination as true 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -57,6 +59,7 @@ exports[`Table.pagination Accepts pagination as true 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"
@ -66,6 +69,7 @@ exports[`Table.pagination Accepts pagination as true 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell"
@ -196,6 +200,7 @@ exports[`Table.pagination renders pagination correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell"
@ -205,6 +210,7 @@ exports[`Table.pagination renders pagination correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"

12
components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap

@ -66,6 +66,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
@ -95,6 +96,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
@ -124,6 +126,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
@ -153,6 +156,7 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left ant-table-cell-fix-left-last"
@ -331,6 +335,7 @@ exports[`Table.rowSelection fix selection column on the left when any other colu
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left"
@ -361,6 +366,7 @@ exports[`Table.rowSelection fix selection column on the left when any other colu
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left"
@ -391,6 +397,7 @@ exports[`Table.rowSelection fix selection column on the left when any other colu
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left"
@ -421,6 +428,7 @@ exports[`Table.rowSelection fix selection column on the left when any other colu
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell ant-table-selection-column ant-table-cell-fix-left"
@ -625,6 +633,7 @@ exports[`Table.rowSelection use column as selection column when key is \`selecti
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -653,6 +662,7 @@ exports[`Table.rowSelection use column as selection column when key is \`selecti
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -681,6 +691,7 @@ exports[`Table.rowSelection use column as selection column when key is \`selecti
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -709,6 +720,7 @@ exports[`Table.rowSelection use column as selection column when key is \`selecti
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell ant-table-selection-column"

1
components/table/__tests__/__snapshots__/Table.sorter.test.js.snap

@ -159,6 +159,7 @@ exports[`Table.sorter should support defaultOrder in Column 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"

2
components/table/__tests__/__snapshots__/Table.test.js.snap

@ -60,6 +60,7 @@ exports[`Table renders JSX correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell"
@ -79,6 +80,7 @@ exports[`Table renders JSX correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell"

176
components/table/__tests__/__snapshots__/demo.test.js.snap

File diff suppressed because it is too large

16
components/transfer/__tests__/__snapshots__/demo.test.js.snap

@ -1903,6 +1903,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="0"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -1946,6 +1947,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="1"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -1988,6 +1990,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="3"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2030,6 +2033,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="4"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2073,6 +2077,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="6"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2115,6 +2120,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="7"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2157,6 +2163,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="9"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2199,6 +2206,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="10"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2241,6 +2249,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="12"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2284,6 +2293,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="13"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2562,6 +2572,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="2"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2590,6 +2601,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="5"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2618,6 +2630,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="8"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2647,6 +2660,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="11"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2675,6 +2689,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="14"
>
<td
class="ant-table-cell ant-table-selection-column"
@ -2703,6 +2718,7 @@ exports[`renders ./components/transfer/demo/table-transfer.md correctly 1`] = `
</tr>
<tr
class="ant-table-row ant-table-row-level-0"
data-row-key="17"
>
<td
class="ant-table-cell ant-table-selection-column"

1
docs/react/migration-v4.en-US.md

@ -116,6 +116,7 @@ const Demo = () => (
- The Grid component uses flex layout.
- Button's `danger` is now treated as a property instead of a button type.
- Input, Select set `value` to `undefined` is uncontrolled mode now.
- Table will keep at least one column even if `columns` is empty.
## Start upgrading

1
docs/react/migration-v4.zh-CN.md

@ -116,6 +116,7 @@ const Demo = () => (
- Grid 组件使用 flex 布局。
- Button 的 `danger` 现在作为一个属性而不是按钮类型。
- Input、Select 的 `value``undefined` 时改为非受控状态。
- Table 在没有 `columns` 时仍然会保留一列。
## 开始升级

2
package.json

@ -121,7 +121,7 @@
"rc-slider": "~9.0.0-alpha.0",
"rc-steps": "~3.5.0",
"rc-switch": "~1.9.0",
"rc-table": "~7.0.0-rc.3",
"rc-table": "~7.0.0-rc.4",
"rc-tabs": "~10.0.0-alpha.1",
"rc-tooltip": "~4.0.0-alpha.3",
"rc-tree": "~3.0.0-alpha.37",

Loading…
Cancel
Save