Skip to content

Commit 450db51

Browse files
author
Łukasz Serwatka
authored
Merge pull request #95 from ezsystems/fix-rendering-panels
EZP-29452: Rendering unused panels in Universal Discovery
2 parents ede18df + e06b57b commit 450db51

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Resources/public/js/UniversalDiscovery.module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Resources/public/js/UniversalDiscovery.module.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/modules/universal-discovery/universal.discovery.module.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,8 +794,14 @@ export default class UniversalDiscoveryModule extends Component {
794794
allowContainersOnly,
795795
} = this.props;
796796
const { activeTab, maxHeight, contentTypesMap } = this.state;
797+
const isVisible = activeTab === item.id;
798+
799+
if (!isVisible) {
800+
return null;
801+
}
802+
797803
const attrs = {
798-
isVisible: activeTab === item.id,
804+
isVisible,
799805
onItemSelect: this.onItemSelect,
800806
maxHeight: maxHeight - 32,
801807
id: item.id,

0 commit comments

Comments
 (0)