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

[Slider] Add ability to pass a ref prop for input element through SliderThumb #3033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

metalix2
Copy link

Description

Hello 👋

Thank you for reading my PR. 🙏

I've found a use case where we're not able to interact with the input element in the Slider thumb. While you try to take care of this with the BubbleInput it's still limiting for consumers who want to do more e.g. pass more attributes or just have context of the input element itself.

With this change, it enables consumers to set an accessable ref on the input element. Allowing the consumer to set attributes like form or id (for related label elements).
Consumers can also add their own onEventListeners directly to the <input>.

Changes

  • Added inputRef Prop for SliderThumb and BubbleInput
  • Updated Slider Storybook with inputRef example.

If there is anything you are unsure about please do comment quesitons, suggestions the lot.

Best Wishes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant