-
-
Notifications
You must be signed in to change notification settings - Fork 531
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Before you start - checklist
- I followed instructions in documentation written for my React-Calendar version
- I have checked if this bug is not already reported
Description
I tried to add tile contents depending on the active month. However, the cached return value of tileContent
function is not invalidated after the change of activeStartDate
. As a result, some tiles are displayed as if activeStartDate
were in another month.
Steps to reproduce
- Go to https://codesandbox.io/s/priceless-tdd-e6e7g?file=/src/App.js.
- Show Jan 2022. A check mark is displayed for each day in Jan.
- Move to Dec 2021.
Expected behavior
tileContent
is re-evaluated for Dec 27th to Jan 2nd, so check marks appear in Dec 27th to 31st.
Actual behavior
Tile contents are cached and marks are still displayed for Jan 1st and 2nd.
Additional information
No response
Environment
- Browser (if applicable): Chrome 96
- React-Calendar version: 3.5.0
- React version: 17.0.2
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working