react-tabs icon indicating copy to clipboard operation
react-tabs copied to clipboard

Getting a ref to TabPanel's component

Open astanciu opened this issue 8 years ago • 3 comments

Is there any way to get a ref to the component in a TabPanel? Currently they are always returning null.

<Tabs>
...
<TabPanel>
  <MyComponent ref={(comp) => { console.log('ref: ', comp); }} />
</TabPanel>
</Tabs>

I saw the docs mentioning domRef but that seems to only apply only to Tabs component

astanciu avatar Oct 11 '17 16:10 astanciu

We have same issue. We have two tabs:

  • One tab contain the form
  • One tab contain the select component

When we active the tab select and click on submit, we can't get the ref data from the form tab.

tamnv avatar Dec 29 '17 09:12 tamnv

@astanciu is still there this issue? I try version 2.2.1 and it works fine.

Elecweb avatar Apr 12 '18 13:04 Elecweb

It doesn't work with the latest version. If you find that working, do your code using fiddle or something else

KaranPalan7507 avatar Mar 27 '19 06:03 KaranPalan7507