diff --git a/README.md b/README.md index 01f59467b..dbe625eb7 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,25 @@ React.render(
| does not crash if scroll is not set 1`] = ` > | title1 | @@ -905,7 +905,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = `title12 | @@ -1034,7 +1034,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` >123 | @@ -1096,7 +1096,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = `xxxxxxxx | @@ -1107,7 +1107,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` >cdd | @@ -1169,7 +1169,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = `edd12221 | @@ -1180,7 +1180,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` >133 | @@ -1228,7 +1228,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 133 | @@ -1285,7 +1285,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />|||||||||||
| 133 | @@ -1342,7 +1342,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />|||||||||||
| 133 | @@ -1399,7 +1399,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />|||||||||||
| 133 | @@ -1456,7 +1456,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />|||||||||||
| 133 | @@ -1513,7 +1513,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />|||||||||||
| 133 | @@ -1570,7 +1570,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - with data 1`] = ` />title1 | @@ -1694,7 +1694,7 @@ exports[`Table.FixedColumn > renders correctly > scrollX - without data 1`] = `title12 | @@ -1901,7 +1901,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = `title1 | @@ -1980,7 +1980,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = `@@ -2136,7 +2136,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` > | 123 | @@ -2198,7 +2198,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = `xxxxxxxx | @@ -2209,7 +2209,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` >cdd | @@ -2271,7 +2271,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = `edd12221 | @@ -2282,7 +2282,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` >133 | @@ -2330,7 +2330,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />||
| 133 | @@ -2387,7 +2387,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />|||||||||||
| 133 | @@ -2444,7 +2444,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />|||||||||||
| 133 | @@ -2501,7 +2501,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />|||||||||||
| 133 | @@ -2558,7 +2558,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />|||||||||||
| 133 | @@ -2615,7 +2615,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />|||||||||||
| 133 | @@ -2672,7 +2672,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - with data 1`] = ` />title1 | @@ -2802,7 +2802,7 @@ exports[`Table.FixedColumn > renders correctly > scrollXY - without data 1`] = `diff --git a/tests/__snapshots__/Summary.spec.tsx.snap b/tests/__snapshots__/Summary.spec.tsx.snap index c71599c83..6904cccea 100644 --- a/tests/__snapshots__/Summary.spec.tsx.snap +++ b/tests/__snapshots__/Summary.spec.tsx.snap @@ -8,7 +8,7 @@ exports[`Table.Summary > support data type 1`] = ` | Light | diff --git a/tests/__snapshots__/Table.spec.jsx.snap b/tests/__snapshots__/Table.spec.jsx.snap index 90936f847..dca0d4471 100644 --- a/tests/__snapshots__/Table.spec.jsx.snap +++ b/tests/__snapshots__/Table.spec.jsx.snap @@ -98,7 +98,7 @@ exports[`Table.Basic > custom components > renders fixed column and header corre class="rc-table-cell rc-table-cell-fix rc-table-cell-fix-start rc-table-cell-fix-start-shadow" name="my-header-cell" scope="col" - style="inset-inline-start: 0; --z-offset: 8; --z-offset-reverse: 4;" + style="inset-inline-start: 0px; --z-offset: 8; --z-offset-reverse: 4;" > Name @@ -120,7 +120,7 @@ exports[`Table.Basic > custom components > renders fixed column and header corre@@ -179,7 +179,7 @@ exports[`Table.Basic > custom components > renders fixed column and header corre | Lucy | @@ -192,7 +192,7 @@ exports[`Table.Basic > custom components > renders fixed column and header correF | diff --git a/tests/refs.spec.tsx b/tests/refs.spec.tsx index a53b03cb7..b2d022fe9 100644 --- a/tests/refs.spec.tsx +++ b/tests/refs.spec.tsx @@ -21,6 +21,7 @@ describe('Table.Ref', () => { beforeEach(() => { scrollParam = null; + scrollIntoViewElement = null; }); it('support reference', () => { @@ -109,4 +110,78 @@ describe('Table.Ref', () => { }); expect(scrollIntoViewElement.textContent).toEqual('light'); }); + + it('support scrollTo with align', () => { + const ref = React.createRef