mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-08 02:08:12 +08:00
Make sure there are more than 1 values in a category before rendering it (#1871)
This commit is contained in:
@@ -185,7 +185,9 @@ class Categories extends React.Component {
|
|||||||
{/* READ ONLY CATEGORICAL FIELDS */}
|
{/* READ ONLY CATEGORICAL FIELDS */}
|
||||||
{/* this is duplicative but flat, could be abstracted */}
|
{/* this is duplicative but flat, could be abstracted */}
|
||||||
{allCategoryNames.map((catName) =>
|
{allCategoryNames.map((catName) =>
|
||||||
!schema.annotations.obsByName[catName].writable ? (
|
!schema.annotations.obsByName[catName].writable &&
|
||||||
|
(schema.annotations.obsByName[catName].categories?.length > 1 ||
|
||||||
|
!schema.annotations.obsByName[catName].categories) ? (
|
||||||
<Category
|
<Category
|
||||||
key={catName}
|
key={catName}
|
||||||
metadataField={catName}
|
metadataField={catName}
|
||||||
|
|||||||
Reference in New Issue
Block a user