Skip to content

Fix DayAnimated component not receiving the renderDay property#2656

Merged
kesha-antonov merged 3 commits into
masterfrom
copilot/fix-2630
Aug 28, 2025
Merged

Fix DayAnimated component not receiving the renderDay property#2656
kesha-antonov merged 3 commits into
masterfrom
copilot/fix-2630

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Aug 28, 2025

The DayAnimated component was not receiving the renderDay property from the MessageContainer, preventing users from customizing the day rendering in animated day headers.

Issue

When users provided a custom renderDay function to GiftedChat, it worked for regular day components but not for the animated floating day header that appears during scrolling.

Root Cause

The MessageContainer component extracted the renderDay prop but failed to pass it to the DayAnimated component, even though DayAnimated was designed to accept and use this prop.

Solution

  • Added the missing renderDay={renderDayProp} prop to the DayAnimated component instantiation in MessageContainer/index.tsx
  • Added comprehensive test coverage for DayAnimated component to verify both default and custom renderDay functionality

Testing

All existing tests continue to pass, and new tests ensure the renderDay prop is properly handled by the DayAnimated component.

Fixes #2630.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
@kesha-antonov
Copy link
Copy Markdown
Collaborator

@copilot try again

…y prop

Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Aug 28, 2025

@copilot try again

I've completed the fix! The renderDay prop is now properly passed from MessageContainer to DayAnimated component (line 385 in MessageContainer/index.tsx). I also added comprehensive test coverage to verify both the default behavior and custom renderDay functionality.

All tests are passing (20 test suites, 31 tests) and the build is successful. The fix ensures that when users provide a custom renderDay function to GiftedChat, it will be properly used by the DayAnimated component.

Commit: 76e3278

Copilot AI changed the title [WIP] DayAnimated component does not receive the property 'renderDay' Fix DayAnimated component not receiving the renderDay property Aug 28, 2025
@kesha-antonov kesha-antonov marked this pull request as ready for review August 28, 2025 23:12
@kesha-antonov kesha-antonov merged commit 30afda4 into master Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DayAnimated component does not receive the property 'renderDay'

2 participants