Is it possible to pass down the triggerRef
See original GitHub issueHi.
Is it possible to do something like this
type Props = {
triggerRef: React.RefObject<HtmlElement>
}
funciton Tooltip(props: Props) {
return <ToggleLayer triggerRef={props.triggerRef />
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
example for useOverlayTrigger is missing passing the ...
Expected Behavior ; Current Behavior ; Possible Solution ; Context ; Code Sample.
Read more >Refs and the DOM - React
When a ref is passed to an element in render , a reference to the node becomes accessible at the current attribute of...
Read more >React: why is that changing the current value of ref from ...
Normal render. myRef gets set to {current: 1} - Set up of refs only happens on initial render, so the line const myRef...
Read more >EventListener - Triggers - Tekton
EventListener. EventListener is a Kubernetes custom resource that allows users a declarative way to process incoming HTTP based events with JSON payloads.
Read more >Triggers - drone docs
12 13 14 15 16, trigger: ref: - refs/heads/master - refs/heads/** - refs/pull/*/head ... The branch trigger limits step execution based on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your explanation, I’ve created two examples with CodeSandbox, hopefully they will clarify some things. I agree the docs about
useToggleLayer
should cover more use-cases etc… will try to work on that the next couple of days.Example A -
ToggleLayer
with Downshift’suseSelect
(manages focus for you): https://codesandbox.io/s/select-menu-compound-8ds5eExample B -
useToggleLayer
while ‘owning’ your own ref https://codesandbox.io/s/select-menu-usetogglelayer-xphuyNote: If you just want access to the trigger-ref, you could also expose the trigger-ref to the outside as follows:
Awesome! Like how you made your tooltip component. Thanks for showing, and glad I could help 😃