fix(mui): themedtitle sidebar title#7244
Conversation
🦋 Changeset detectedLatest commit: 4ddbff4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hey @harsha-cpp, thanks for the PR! The Title prop is typed as React.FC, so it only accepts function components. The existing code const RenderToTitle = TitleFromProps ?? DefaultTitle already handles this correctly — if Title is provided it's used, otherwise the default kicks in. The isValidElement / ReactNode branches in renderTitle handle cases the type system doesn't even allow. Also, the changeset is marked as major but there's no breaking change here. I wasn't able to reproduce #7239 either. Closing this one — thanks for looking into it! |
PR Checklist
What is the current behavior?
ThemedSiderdoesn’t consistently honor theTitleoverride. WhenTitleis provided as a render prop or element, the default title may still render.What is the new behavior?
If
Titleis provided, it is always rendered (supports component, render prop, or element) and the default title is only used when no override is provided.Fixes (issue)
Fixes #7239