react-custom-scrollbars不会调整大小

时间:2019-03-29 18:56:19

标签: javascript reactjs

我正在使用react-custom-scrollbars,并且在调整窗口大小之前可以正常使用。

需要一个静态高度。我已经尝试过使用private void Load_btn_Click(object sender, EventArgs e) { // get the file path from the textbox, probably want a validation check to // ensure that it's a valid path Catalog catalog = DataStore.Load(filePath); } 进行某些操作,并将该值传递给window.onresize的样式。像这样:

Scrollbars

有人知道如何在export const CustomScrollBar = props => { let height; window.onload = () => { height = window.innerHeight } window.onresize = () => { height = window.innerHeight } return ( <StyledCustomScrollBar> <Scrollbars autoHide autoHeight={true} style={{ height: height }} > {props.children} </Scrollbars> </StyledCustomScrollBar> ) } 响应窗口调整大小时对其进行修复吗?

0 个答案:

没有答案