Closed SwikarBhattarai closed 1 week ago
Switching between day and week views seems to be having performance issues. For now, you can use the method of separating the day calendar into a separate component.
Example:
viewMode === "day" ? <CalendarContainer>…</CalendarContainer> : <CalendarContainer>…</CalendarContainer>
Thanks, it works fine now .
I will notify you when I have fixed this issue. At that point, you can merge the code back into a single component.
ah. you can try change key of component. I’m a bit busy right now, I’ll send you the sample code later
@SwikarBhattarai Since the layout of the day mode is different from the week mode, there are some issues with switching between them. For now, you can handle it this way—changing the key, it will force refresh the calendar.
This means you’ll set scrollToNow to false and manually control the scrolling on the first load using onLoad and customRef.
https://github.com/user-attachments/assets/206c5e31-a88c-43cd-a4d1-13178e6cd682
At first mount of screen, the default number of days is 7 then i switched to day view with number of days 1. The header becomes blank. @howljs