diff --git a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss index 730ce311ad52..9cbd3a8189a8 100644 --- a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss +++ b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.scss @@ -1,4 +1,10 @@ :global(.htx-taxonomy-item-color) { padding: 4px; border-radius: 2px; -} \ No newline at end of file +} + +// increase specificity to override usual .ant-select-dropdown z-index +:global(.htx-taxonomy-dropdown.ant-select-dropdown) { + // Create Project popup has 2000 + z-index: 3000; +} diff --git a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx index a1fcd742d807..c6770de2360c 100644 --- a/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx +++ b/web/libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx @@ -196,6 +196,7 @@ const NewTaxonomy = ({ placeholder={options.placeholder || "Click to add..."} style={style} className="htx-taxonomy" + popupClassName="htx-taxonomy-dropdown" disabled={!isEditable} /> ); diff --git a/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js b/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js index 226cc006c349..411592936462 100644 --- a/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js +++ b/web/libs/editor/src/mixins/SharedChoiceStore/mixin.js @@ -1,4 +1,4 @@ -import { types } from "mobx-state-tree"; +import { tryReference, types } from "mobx-state-tree"; import Types from "../../core/Types"; import { SharedStoreModel } from "./model"; @@ -30,7 +30,7 @@ const Store = types.optional(types.maybeNull(types.late(() => types.reference(Sh * * It was specifically designed to be used with Repeater tag where the memory issues are the most sound. * - * This mixin provedes a `sharedStore` property to the model which is a reference to the shared store. + * This mixin provides a `sharedStore` property to the model which is a reference to the shared store. * * The concept behind it is that whenever a model is parsing a snapshot, children are subtracted from the * initial snapshot, and put into the newly created SharedStore. @@ -73,7 +73,9 @@ export const SharedStoreMixin = types })) .actions((self) => ({ afterCreate() { - if (!self.store) { + const currentStore = tryReference(() => self.store); + + if (!currentStore) { const store = Stores.get(self.storeId); const annotationStore = Types.getParentOfTypeString(self, "AnnotationStore");