You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,everyone. I'm a newcomer in React. In my development using rc-dock, the main issue is that it's hard for me to access the component instance inside a tab. For example I want to call the component's method or change its state from outside (outside the tab and dock layout.)
take the demo "controlled-layout" for example.
let tab0 = {
title: 'Controlled Layout',
content: (
<div>
<p>When you use <b>layout</b> instead of <b>defaultLayout</b> on <DockLayout></p>
<p>DockLayout will work as a controlled component</p>
</div>
)
};
in this demo we define the content in tab0 in this way.
let's say I import a custom component and add it to tab0, it becames:
import {CustomComponent} from "./select";
//other code
let tab0 = {
title: 'Controlled Layout',
content: (
<div>
<p>When you use <b>layout</b> instead of <b>defaultLayout</b> on <DockLayout></p>
<p>DockLayout will work as a controlled component</p>
<CustomComponent></CustomComponent>
</div>
)
};
what should I do if I want to get the instance "CustomComponent" that in tab0?
in the demo, the" render(){return()}" part only have<DockLayout >
I tried to use ref but don't know how to use it with rc-dock.
The text was updated successfully, but these errors were encountered:
Hi,everyone. I'm a newcomer in React. In my development using rc-dock, the main issue is that it's hard for me to access the component instance inside a tab. For example I want to call the component's method or change its state from outside (outside the tab and dock layout.)
take the demo "controlled-layout" for example.
in this demo we define the content in tab0 in this way.
let's say I import a custom component and add it to tab0, it becames:
what should I do if I want to get the instance "CustomComponent" that in tab0?
in the demo, the" render(){return()}" part only have
<DockLayout >
I tried to use ref but don't know how to use it with rc-dock.
The text was updated successfully, but these errors were encountered: