Skip to content

Commit

Permalink
chore: fix incorrect size updating (#1325)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvet authored Aug 17, 2018
1 parent 331829f commit 0540239
Show file tree
Hide file tree
Showing 2 changed files with 201 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ exports[`VirtualTableLayout should render correct layout 1`] = `
<tableComponent
style={
Object {
"marginBottom": "40px",
"marginBottom": "120px",
"minWidth": "400px",
}
}
Expand Down Expand Up @@ -590,18 +590,212 @@ exports[`VirtualTableLayout should render correct layout 1`] = `
</rowComponent>
</RefHolder>
<RefHolder
key="stub_4_8"
key="5"
>
<rowComponent
tableRow={
Object {
"key": 5,
}
}
>
<cellComponent
colSpan={1}
key="a"
tableColumn={
Object {
"column": Object {
"name": "a",
},
"key": "a",
}
}
tableRow={
Object {
"key": 5,
}
}
/>
<cellComponent
colSpan={1}
key="b"
tableColumn={
Object {
"column": Object {
"name": "b",
},
"key": "b",
}
}
tableRow={
Object {
"key": 5,
}
}
/>
<cellComponent
colSpan={1}
key="c"
tableColumn={
Object {
"column": Object {
"name": "c",
},
"key": "c",
}
}
tableRow={
Object {
"key": 5,
}
}
/>
<cellComponent
colSpan={1}
key="d"
tableColumn={
Object {
"column": Object {
"name": "d",
},
"key": "d",
}
}
tableRow={
Object {
"key": 5,
}
}
/>
<cellComponent
colSpan={1}
key="e"
tableColumn={
Object {
"column": Object {
"name": "e",
},
"key": "e",
}
}
tableRow={
Object {
"key": 5,
}
}
/>
</rowComponent>
</RefHolder>
<RefHolder
key="6"
>
<rowComponent
tableRow={
Object {
"key": 6,
}
}
>
<cellComponent
colSpan={1}
key="a"
tableColumn={
Object {
"column": Object {
"name": "a",
},
"key": "a",
}
}
tableRow={
Object {
"key": 6,
}
}
/>
<cellComponent
colSpan={1}
key="b"
tableColumn={
Object {
"column": Object {
"name": "b",
},
"key": "b",
}
}
tableRow={
Object {
"key": 6,
}
}
/>
<cellComponent
colSpan={1}
key="c"
tableColumn={
Object {
"column": Object {
"name": "c",
},
"key": "c",
}
}
tableRow={
Object {
"key": 6,
}
}
/>
<cellComponent
colSpan={1}
key="d"
tableColumn={
Object {
"column": Object {
"name": "d",
},
"key": "d",
}
}
tableRow={
Object {
"key": 6,
}
}
/>
<cellComponent
colSpan={1}
key="e"
tableColumn={
Object {
"column": Object {
"name": "e",
},
"key": "e",
}
}
tableRow={
Object {
"key": 6,
}
}
/>
</rowComponent>
</RefHolder>
<RefHolder
key="stub_6_8"
>
<rowComponent
style={
Object {
"height": "200px",
"height": "120px",
}
}
tableRow={
Object {
"height": 200,
"key": "stub_4_8",
"height": 120,
"key": "stub_6_8",
"type": "stub",
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export class VirtualTableLayout extends React.PureComponent {
} = this.state;

if (prevHeaderHeight !== headerHeight
&& prevBodyHeight !== bodyHeight
&& prevFooterHeight !== footerHeight) {
|| prevBodyHeight !== bodyHeight
|| prevFooterHeight !== footerHeight) {
this.setState({
headerHeight,
bodyHeight,
Expand Down

0 comments on commit 0540239

Please sign in to comment.