Skip to content

Commit 117cedb

Browse files
committed
fix: LEAP-2064: Choices on imported annotations are not displayed in View All on initial load
1 parent d7ede44 commit 117cedb

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

web/libs/editor/src/stores/Annotation/store.js

+17
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ const AnnotationStoreModel = types
6868
self.selected.selected = false;
6969
}
7070

71+
// When FF_SIMPLE_INIT is enabled, we need to ensure all annotations have their results set given that, due
72+
// to enforcing a better performance, we are not "selecting" all annotations and therefore the right values
73+
// won't be set.
74+
if (isFF(FF_SIMPLE_INIT)) {
75+
self.annotations.forEach(annotation => {
76+
// Skip the current annotation as it's already handled
77+
if (annotation === self.selected) return;
78+
79+
// Set results for each annotation without selecting it
80+
annotation.results.forEach(result => {
81+
if (result.from_name.type === "choices" || result.from_name.type === "taxonomy") {
82+
result.from_name.updateFromResult(result.mainValue);
83+
}
84+
});
85+
});
86+
}
87+
7188
self.annotations.forEach((c) => {
7289
c.editable = false;
7390
});

web/libs/editor/src/tags/control/Choice/Choice.scss

+4
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,7 @@ body :global(.ant-checkbox-checked)::after {
8989
:global(.ant-checkbox-wrapper span + span) {
9090
color: var(--color-neutral-content);
9191
}
92+
93+
body :global(.ant-checkbox-disabled .ant-checkbox-inner) {
94+
background-color: var(--color-neutral-background);
95+
}

0 commit comments

Comments
 (0)