Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[form controls] Add inputRef prop to roots #1683

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

atomiks
Copy link
Contributor

@atomiks atomiks commented Apr 8, 2025

Closes #1619

  • RadioGroup and Radio
  • Slider
  • Select

@atomiks atomiks added the component: form This is the name of the generic UI component, not the React module! label Apr 8, 2025
Copy link

netlify bot commented Apr 8, 2025

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit ca16129
🔍 Latest deploy log https://app.netlify.com/sites/base-ui/deploys/67f8a6e23618b20008ffcaac
😎 Deploy Preview https://deploy-preview-1683--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 site configuration.

@@ -41,6 +41,7 @@ const SliderRoot = React.forwardRef(function SliderRoot<Value extends number | r
step = 1,
tabIndex: externalTabIndex,
value,
inputRef,
Copy link
Member

Choose a reason for hiding this comment

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

For slider, I think we need to put this on the Thumb to support range sliders

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It gets forwarded to the <input> in Thumb via context

Copy link
Member

Choose a reason for hiding this comment

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

I meant in a range slider each thumb has it's own input element, so they can't all take the same ref

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually had it on Slider.Thumb already, just removed it from the Root

@atomiks atomiks marked this pull request as ready for review April 8, 2025 08:40
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: form This is the name of the generic UI component, not the React module! PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supply an inputProps prop to access hidden <input> elements
2 participants