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

allow "ref" attribute support on elements #253

Open
alpjor opened this issue Oct 21, 2020 · 3 comments
Open

allow "ref" attribute support on elements #253

alpjor opened this issue Oct 21, 2020 · 3 comments
Labels
chime-setup feature-request New feature or request Front-end Pull requests that need review from a front-end expert Triaged

Comments

@alpjor
Copy link
Contributor

alpjor commented Oct 21, 2020

Along with the "Focusable" Interface suggested in #252, it would be nice if components supported adding of "ref" attributes so that parent components can call them for focusing and blurring

@alpjor
Copy link
Contributor Author

alpjor commented Oct 21, 2020

Also for things like attaching to events via .addEventListener( etc.

@p-foucht
Copy link
Contributor

For any others arriving at this ticket, this is an enhancement we have backlogged to add ref support to all elements.

As an immediate workaround, you can always wrap the component with your own ref to access it

// use whatever browser API you prefer to grab the element
console.log(myRef.firstElementChild)

return (
 <div ref={myRef}>
   <SomeComponent />
 </div>
)

@vidya-mohan vidya-mohan added chime-setup Front-end Pull requests that need review from a front-end expert labels May 19, 2021
@everscending
Copy link

Adding my vote for this as well. Ideally, I can pass in a onChange handler to the device selection components as a prop. Using a ref will address this as well though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chime-setup feature-request New feature or request Front-end Pull requests that need review from a front-end expert Triaged
Projects
Development

No branches or pull requests

5 participants