Skip to content

[all components] Include ref in BaseUIComponentProps#2813

Merged
atomiks merged 9 commits into
mui:masterfrom
atomiks:refactor/component-props
Dec 17, 2025
Merged

[all components] Include ref in BaseUIComponentProps#2813
atomiks merged 9 commits into
mui:masterfrom
atomiks:refactor/component-props

Conversation

@atomiks

@atomiks atomiks commented Sep 23, 2025

Copy link
Copy Markdown
Contributor

This makes React 17-18 lie, but shouldn't cause type errors.

This prioritises React 19 where refs are included in props to make the types easier.

@atomiks atomiks added type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: all components Widespread work has an impact on almost all components. labels Sep 23, 2025
Comment thread docs/reference/generated/tabs-tab.json
@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2025

Copy link
Copy Markdown
  • vite-css-base-ui-example

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

commit: 9ba1624

@netlify

netlify Bot commented Sep 23, 2025

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 9ba1624
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/694238893a27f60008d8d8bc
😎 Deploy Preview https://deploy-preview-2813--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

mui-bot commented Sep 23, 2025

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@atomiks atomiks force-pushed the refactor/component-props branch from 945f993 to 3dae1ae Compare September 23, 2025 00:40
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 29, 2025
Signed-off-by: atomiks <cc.glows@gmail.com>
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Dec 14, 2025
const Trigger = React.forwardRef(function Trigger(
props: Menu.Trigger.Props,
ref: React.ForwardedRef<HTMLDivElement>,
ref: React.ForwardedRef<any>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed? Can we use Element instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's an error at ref otherwise; HTMLElement/Element both don't work as it expects HTMLButtonElement.

React 19 works fine though without forwardRef

@atomiks atomiks marked this pull request as ready for review December 16, 2025 10:09
@atomiks atomiks requested a review from colmtuite as a code owner December 16, 2025 10:09
@atomiks atomiks merged commit 42cae49 into mui:master Dec 17, 2025
23 checks passed
@atomiks atomiks deleted the refactor/component-props branch December 17, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: all components Widespread work has an impact on almost all components. type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants