|
|
@@ -55,7 +55,8 @@ class ChartList extends React.Component {
|
|
|
this.setState({
|
|
|
page: chart.page || 1
|
|
|
});
|
|
|
- this.bodyRef.current.parentNode.scrollTo(0, chart.listScrollTop)
|
|
|
+ let parent = this.bodyRef.current.parentNode;
|
|
|
+ parent.scrollTo && parent.scrollTo(0, chart.listScrollTop)
|
|
|
window.addEventListener('resize', this.setBodyWidth);
|
|
|
}
|
|
|
|
|
|
@@ -201,7 +202,7 @@ class ChartList extends React.Component {
|
|
|
this.setState({
|
|
|
page: 1
|
|
|
}, () => {
|
|
|
- this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
})
|
|
|
}}>{g.label}</span>
|
|
|
<GroupSelector
|
|
|
@@ -221,7 +222,7 @@ class ChartList extends React.Component {
|
|
|
this.setState({
|
|
|
page: 1
|
|
|
}, () => {
|
|
|
- this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
})
|
|
|
}}
|
|
|
>
|
|
|
@@ -391,7 +392,7 @@ class ChartList extends React.Component {
|
|
|
// this.setState({
|
|
|
// page: 1
|
|
|
// }, () => {
|
|
|
- // this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ // this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
// })
|
|
|
}}
|
|
|
>
|
|
|
@@ -405,7 +406,7 @@ class ChartList extends React.Component {
|
|
|
// this.setState({
|
|
|
// page: 1
|
|
|
// }, () => {
|
|
|
- // this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ // this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
// })
|
|
|
}}>{selectedRecord.groupCode === t.code ? <span className='current' style={{ fontWeight: 'bold' }}>{t.label}</span> : t.label}</Menu.Item>
|
|
|
}
|
|
|
@@ -436,7 +437,7 @@ class ChartList extends React.Component {
|
|
|
this.setState({
|
|
|
page: pageNumber
|
|
|
}, () => {
|
|
|
- this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -458,7 +459,7 @@ class ChartList extends React.Component {
|
|
|
noGroup: e.target.checked,
|
|
|
page: 1
|
|
|
}, () => {
|
|
|
- this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
+ this.bodyRef.current.parentNode.scrollTo && this.bodyRef.current.parentNode.scrollTo(0, 0)
|
|
|
})
|
|
|
}}><span className="nogroup">未分组</span></Checkbox>
|
|
|
{ this.generateGroupTags() }
|