diff --git a/app/packages/core/src/plugins/OperatorIO/utils/index.ts b/app/packages/core/src/plugins/OperatorIO/utils/index.ts index fe849f7fc0..9317033d4c 100644 --- a/app/packages/core/src/plugins/OperatorIO/utils/index.ts +++ b/app/packages/core/src/plugins/OperatorIO/utils/index.ts @@ -79,7 +79,7 @@ function getOutputComponent(property, options) { function getComponentByView(property) { const view = getViewSchema(property) || {}; - const viewComponentName = view.name; + const viewComponentName = view.component || view.name; if (viewComponentName && !baseViews.includes(viewComponentName)) { return viewAliases[viewComponentName] || viewComponentName; } diff --git a/fiftyone/operators/types.py b/fiftyone/operators/types.py index 715547a128..0caacc0618 100644 --- a/fiftyone/operators/types.py +++ b/fiftyone/operators/types.py @@ -445,6 +445,7 @@ class View: space (12): An ``int`` specifying how much vertical space to allocate out of ``12``. placeholder (None): string to display placeholder text read_only (False): whether the :class:`View` is read-only + component (None): specifying custom component to use as the view """ def __init__(self, **kwargs): @@ -454,6 +455,7 @@ def __init__(self, **kwargs): self.space = kwargs.get("space", None) self.placeholder = kwargs.get("placeholder", None) self.read_only = kwargs.get("read_only", None) + self.component = kwargs.get("component", None) self._kwargs = kwargs def clone(self): @@ -468,6 +470,7 @@ def to_json(self): "space": self.space, "placeholder": self.placeholder, "read_only": self.read_only, + "component": self.component, **self._kwargs, }