Set initial scrollOffset Not working
Hi Now i use react-infinite-calendar.An when i click to show in modal calendar is work fine.But have just a problem.Is initial scrollOffset not set initial scroll position for calendar.I try to Debug in this repo but scrollOffset have value when component mount.
thank you
I found some point is work not fine. This code
getNodeOffset() {
const {scrollDirection} = this.props;
return this.rootNode[scrollProp[scrollDirection]];
}
this.rootNode[scrollProp[scrollDirection]] => this.rootNode[scrollTop] is undefined
This is most likely because you're rendering the calendar in a container that is initially set to display: none. It's not possible to set the scrollTop property of a node if it is set to display: none.
Make sure you only render the calendar once your modal is visible.
Oh!!! that right. thankyou