Open Delocy opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In my case, I gave the state of the item as a key value through the reservationsKeyExtractor property, and when that value changed, it was re-rendered.
reservationsKeyExtractor
How did you do it, can you please shed some lights on this?
reservationsKeyExtractor
How did you do it, can you please shed some lights on this?
Hi, @hughyyyy as you can see from the specification (property) reservationsKeyExtractor?: (item: DayAgenda, index: number) => string so you need to pass a function that will return unique string per each your card item in my case it was something like
reservationsKeyExtractor={((item, index) => { return item.reservation?.task?.id || index })}
hope that helps
Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Description
The problem is that when i press a specific date and made changes to the task, the tasks other than the first one doesnt update instantly. When i put console.log to check only shows that the first task is being rendered 3 times, even though there is 2 tasks for that date.
Only when i press the date again. i can see task 2 out for the console.log
Expected Behavior
i created a complete button for my to do list, when i press the complete button, it udpates my firebase changes the item.completed for the item which is supposed to make a dash across the task name.
Observed Behavior
I had to select the date again for the dash to show. But when i did the same thing for the first task, the dash shows instantly. What could the problem be?
If there's an error message, please paste the full terminal output and error message in this code block:
https://github.com/wix/react-native-calendars/assets/94375191/87ee388a-6fdc-4fd8-a592-f7336b89ee73
Environment
Please run these commands in the project folder and fill in their results:
npm ls react-native-calendars
:npm ls react-native
:Also specify:
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you're reporting.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.