Commit 10114102b7fcead743299bda545467fedaf81e87
1 parent
dffc4ddd
1.处理下拉表格分页查询报错
Showing
1 changed file
with
4 additions
and
1 deletions
src/components/Common/CommonComponent/index.js
| ... | ... | @@ -2638,7 +2638,10 @@ export default class CommonComponent extends Component { |
| 2638 | 2638 | } else { |
| 2639 | 2639 | this.setState({ currentPage: pageNum, selectTableIndex: 0 }); |
| 2640 | 2640 | } |
| 2641 | - this.selectTableRef1.querySelector(".ant-table-body").scrollTop = 0; | |
| 2641 | + const bodyDom = this.selectTableRef1?.querySelector(".ant-table-body"); | |
| 2642 | + if (bodyDom) { | |
| 2643 | + bodyDom.scrollTop = 0; | |
| 2644 | + } | |
| 2642 | 2645 | this.getDropDownData(pageNum, this.state.totalPageCount, this.state.searchValue); |
| 2643 | 2646 | }; |
| 2644 | 2647 | ... | ... |