react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

Update not reflect in UI

Open chingthampiyarilal opened this issue 9 months ago • 4 comments

Description

In Agenda Calender,I creating different event on same date if i tried to update the each event everything is reflected on the data but not the UI.

Expected Behavior

I change to delete inside the package module reservation.js "shouldComponentUpdate(nextProps) {....." ===> When i change this part it works fine

Observed Behavior

Updating event not reflected in the UI but all are reflected in data/ logs..

I dont have any error but

I have a warning : VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc. {"contentLength": 2948, "dt": 843, "prevDt": 883} ! a b

Environment

Please run these commands in the project folder and fill in their results:

Also specify:

  1. Device/emulator/simulator & OS version: Copy_of_Pixel_6_Pro_API_33

Reproducible Demo

Screenshots or gifs of the issue and the suggested fix will help us move faster with the review process.

chingthampiyarilal avatar May 06 '24 08:05 chingthampiyarilal

I am also facing the same issue, were you able to fix this issue? @chingthampiyarilal

srinu6 avatar Jun 12 '24 05:06 srinu6

@srinu6, It works when i delete "shouldComponentUpdate(nextProps) {....." function, inside the node_modules\react-native-calendars\src\agenda\reservation-list\reservation.js

chingthampiyarilal avatar Jun 20 '24 08:06 chingthampiyarilal

Yes, I can confirm, shouldComponentUpdate is not working properly.

hughyyyy avatar Jun 28 '24 01:06 hughyyyy

This issue is happening for me as well. It seems to be caused by:

if (!d1 && !d2) {
  changed = false;
}

in node_modules\react-native-calendars\src\agenda\reservation-list\reservation.js shouldComponentUpdate.

The d1 and d2 props are only provided to the first item on a given date, so any items after the first item on a date don't get updated properly.

jamesa3 avatar Aug 20 '24 00:08 jamesa3