mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 08:18:11 +08:00
categorical UI improvements (#1649)
* return undefined for unknown fields * memoize fetch response * handle rename of user annotation * performance and cleanup * fix snapshots * fix comment * lint
This commit is contained in:
@@ -33,6 +33,18 @@ const ColorsReducer = (
|
||||
return state;
|
||||
}
|
||||
|
||||
case "annotation: category edited": {
|
||||
const { colorAccessor } = state;
|
||||
if (action.metadataField !== colorAccessor) {
|
||||
return state;
|
||||
}
|
||||
/* else update colorAccessor */
|
||||
return {
|
||||
...state,
|
||||
colorAccessor: action.newCategoryText,
|
||||
};
|
||||
}
|
||||
|
||||
case "annotation: delete category": {
|
||||
const { colorAccessor } = state;
|
||||
if (action.metadataField !== colorAccessor) {
|
||||
|
||||
Reference in New Issue
Block a user