I made a modal windows using react-bootstrap-sweetalert lib.
It contains long list of contents, so I allowed overflow:scroll.
What the problem is, when modal open, it doesn't scroll to top.
And scroll to unknown position, so I need to scroll to top manually.
This is simple code
basicAlert = () => {
this.setState({
alert: (
<div>
// long list table
</div>)
});
}
hideAlert = () => {
this.setState({
alert: null
});
}
render() {
return (
{this.state.alert}
// rest contents ...
)
}
Any advice will be big help for me. Thanks