Skip to content

Conversation

@sai6855
Copy link
Contributor

@sai6855 sai6855 commented Oct 14, 2025

@sai6855 sai6855 changed the title [Toast] Fix Toast.Description not rendering when a custom component i… [Toast] Fix Toast.Description not rendering when a custom component is passed Oct 14, 2025
@sai6855 sai6855 added type: bug It doesn't behave as expected. component: toast Changes related to the toast component. labels Oct 14, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 14, 2025

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@2977
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@2977

commit: 443f722

@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 443f722
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/68edf59821eae6000898bb19
😎 Deploy Preview https://deploy-preview-2977--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mui-bot
Copy link

mui-bot commented Oct 14, 2025

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+24B(+0.01%) 🔺+6B(+0.01%)

Details of bundle changes

@atomiks
Copy link
Contributor

atomiks commented Oct 14, 2025

We should add a test for this

@sai6855 sai6855 marked this pull request as ready for review October 14, 2025 06:53
@sai6855
Copy link
Contributor Author

sai6855 commented Oct 14, 2025

We should add a test for this

added 👍

@sai6855 sai6855 requested a review from mj12albert October 14, 2025 06:54
Comment on lines +94 to +95
it('renders the description when passed to render prop', async () => {
function CustomList() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Title component has the same issue

@sai6855 sai6855 requested a review from atomiks October 14, 2025 07:16
@atomiks
Copy link
Contributor

atomiks commented Oct 14, 2025

This will render the element if you do <Toast.Description render={<span />} (with no children) and description is missing, though... not sure if there's a way to detect it

@sai6855
Copy link
Contributor Author

sai6855 commented Oct 14, 2025

This will render the element if you do <Toast.Description render={<span />} (with no children) and description is missing, though... not sure if there's a way to detect it

Got it, as changes in this PR are improved version compared to master branch and considering there isn't elegant way to detect your edge case, should we merge this or keep current changes as is and think of better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: toast Changes related to the toast component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[toast] Toast.Description does not render when a custom component is passed to render

3 participants