force categorical treatment of user annotations (#1663)

This commit is contained in:
Bruce Martin
2020-07-22 17:02:19 -07:00
committed by GitHub
parent 03bad04436
commit 83d572cde2
5 changed files with 39 additions and 20 deletions
@@ -64,7 +64,12 @@ function topNCategories(colSchema, summary, N) {
export function isSelectableCategoryName(schema, name) {
const { index } = schema.annotations.obs;
return name && name !== index && isCategoricalAnnotation(schema, name);
const colSchema = schema.annotations.obsByName[name];
return (
name &&
name !== index &&
(isCategoricalAnnotation(schema, name) || colSchema.writable)
);
}
export function selectableCategoryNames(schema, names) {