Fix DayAnimated component not receiving the renderDay property#2656
Merged
Conversation
Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
Copilot stopped work on behalf of
kesha-antonov due to an error
August 28, 2025 22:44
Collaborator
|
@copilot try again |
…y prop Co-authored-by: kesha-antonov <11584712+kesha-antonov@users.noreply.github.com>
Contributor
Author
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
approved these changes
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DayAnimated component was not receiving the
renderDayproperty from the MessageContainer, preventing users from customizing the day rendering in animated day headers.Issue
When users provided a custom
renderDayfunction 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
renderDayprop but failed to pass it to the DayAnimated component, even though DayAnimated was designed to accept and use this prop.Solution
renderDay={renderDayProp}prop to the DayAnimated component instantiation in MessageContainer/index.tsxTesting
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.