Unverified Commit 52a060a4 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Fix the error due to opening the Proteins tab for a non-coding gene (#497)

- do not pass non-coding genes to the protein view
- make tab's disabled styles win over the selected styles
- update the message to show in the panel when no data is available
parent 90e415e9
Pipeline #155081 passed with stages
in 5 minutes and 38 seconds
......@@ -112,9 +112,11 @@ const GeneFunction = (props: Props) => {
const getCurrentTabContent = () => {
switch (selectedTabName) {
case GeneFunctionTabName.PROTEINS:
return <ProteinsList gene={props.gene} />;
if (hasProteinCodingTranscripts) {
return <ProteinsList gene={props.gene} />;
}
default:
return <>Data for these views will be available soon...</>;
return <>No data</>;
}
};
......
......@@ -103,7 +103,7 @@ const GeneRelationships = (props: Props) => {
case GeneRelationshipsTabName.GENE_FAMILIES:
return <>Gene families data</>;
default:
return <>Data for these views will be available soon...</>;
return <>No data</>;
}
};
......
......@@ -53,7 +53,7 @@ export const Tabs = (props: TabsProps) => {
return classNames(defaultClassNames, {
[disabledClassNames]: tab.isDisabled,
[selectedClassNames]: tab.title === props.selectedTab
[selectedClassNames]: !tab.isDisabled && tab.title === props.selectedTab
});
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment