Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const panes = [
- {
- menuItem: 'Record 1',
- render: () => <Tab.Pane>Tab 1 Content</Tab.Pane>
- }
- ]
- ...
- <Tab panes={panes}/>
- getPanes() {
- return this
- .state
- .source
- .map((source) => [{
- menuItem: source.sourceName,
- render: () => <Tab.Pane>Tab 1 Content</Tab.Pane>
- }])
- }
- ...
- <Tab panes={this.getPanes}/>
- Warning: Failed prop type: Invalid prop `panes` of type `function` supplied to `Tab`, expected an array.
- getPanes() {
- return this
- .state
- .source
- .map((source) => ({
- menuItem: source.sourceName,
- render: () => <Tab.Pane>Tab 1 Content</Tab.Pane>
- }));
- }
Add Comment
Please, Sign In to add comment