mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-08 06:58:11 +08:00
ensure there is always an unassigned label in user created category (#1644)
This commit is contained in:
@@ -48,6 +48,10 @@ export const annotationCreateCategoryAction = (
|
|||||||
const col = catToDupDf.col(categoryToDuplicate);
|
const col = catToDupDf.col(categoryToDuplicate);
|
||||||
initialValue = col.asArray();
|
initialValue = col.asArray();
|
||||||
({ categories } = col.summarize());
|
({ categories } = col.summarize());
|
||||||
|
// all user-created annotations must have the unassigned category
|
||||||
|
if (!categories.includes(globals.unassignedCategoryLabel)) {
|
||||||
|
categories.push(globals.unassignedCategoryLabel);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* else assign to the standard default value */
|
/* else assign to the standard default value */
|
||||||
initialValue = globals.unassignedCategoryLabel;
|
initialValue = globals.unassignedCategoryLabel;
|
||||||
|
|||||||
Reference in New Issue
Block a user