maybe this is a bug, can you help me?
I'am trying to dynamically select the tabs to present in a tabView.
Whe you use the next code code :
Code: Select all
<TabView>
...
{ false && <TabPanel header="aaa" rightIcon="pi pi-fw pi-file pi-menuitem-icon"> AAA </TabPanel> }
</TabView>
Code: Select all
TypeError: Cannot read property 'props' of null
TabView.renderTabHeader
D:/SCRIPTS/protoWeb/adminreports2/node_modules/primereact/components/tabview/TabView.js:130
127 | var _this2 = this;
128 |
129 | var selected = this.isSelected(index);
> 130 | var className = (0, _classnames.default)(tab.props.headerClassName, 'p-unselectable-text', {
131 | 'p-tabview-selected p-highlight': selected,
132 | 'p-disabled': tab.props.disabled
133 | });
View compiled
(anonymous function)
D:/SCRIPTS/protoWeb/adminreports2/node_modules/primereact/components/tabview/TabView.js:163
160 | var _this3 = this;
161 |
162 | return _react.default.Children.map(this.props.children, function (tab, index) {
> 163 | return _this3.renderTabHeader(tab, index);
164 | });
165 | }
166 | }, {