diff --git a/app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx b/app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx index 3d4c16a5e0..95a57371ab 100644 --- a/app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx +++ b/app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx @@ -78,14 +78,14 @@ export default function DashboardView(props: ViewPropsType) { const onCloseItem = useCallback( ({ id, path }) => { - if (schema.view.on_close_item) { + if (schema.view.on_remove_item) { triggerPanelEvent(panelId, { - operator: schema.view.on_close_item, + operator: schema.view.on_remove_item, params: { id, path }, }); } }, - [panelId, props, schema.view.on_close_item, triggerPanelEvent] + [panelId, props, schema.view.on_remove_item, triggerPanelEvent] ); const onAddItem = useCallback(() => { if (schema.view.on_add_item) { diff --git a/app/packages/operators/src/built-in-operators.ts b/app/packages/operators/src/built-in-operators.ts index e56c6bc27b..c3f6be413e 100644 --- a/app/packages/operators/src/built-in-operators.ts +++ b/app/packages/operators/src/built-in-operators.ts @@ -847,6 +847,7 @@ class SetPanelState extends Operator { return { updatePanelState: useUpdatePanelStatePartial() }; } async execute(ctx: ExecutionContext): Promise { + debugger; ctx.hooks.updatePanelState(ctx, { targetPartial: "state" }); } } diff --git a/fiftyone/operators/executor.py b/fiftyone/operators/executor.py index a9a740c467..828d8cbc4e 100644 --- a/fiftyone/operators/executor.py +++ b/fiftyone/operators/executor.py @@ -654,7 +654,6 @@ def prompt( params=None, on_success=None, on_error=None, - on_cancel=None, ): """Prompts the user to execute the operator with the given URI. @@ -663,7 +662,6 @@ def prompt( params (None): a dictionary of parameters for the operator on_success (None): a callback to invoke if the user successfully executes the operator on_error (None): a callback to invoke if the execution fails - on_cancel (None): a callback to invoke if the user cancels the operation Returns: a :class:`fiftyone.operators.message.GeneratedMessage` containing diff --git a/fiftyone/operators/types.py b/fiftyone/operators/types.py index c29b8f1cb2..da6958d7cb 100644 --- a/fiftyone/operators/types.py +++ b/fiftyone/operators/types.py @@ -1858,13 +1858,13 @@ class PromptView(View): import fiftyone.operators.types as types # in resolve_input - prompt = types.Prompt( + prompt = types.PromptView( label="This is the title", submit_button_label="Click me", cancel_button_label="Abort" ) inputs = types.Object() - inputs.str("message", label="Message") + inputs.md("Hello world!") return types.Property(inputs, view=prompt) Args: @@ -2022,7 +2022,8 @@ class DashboardView(View): Args: layout (None): the layout of the dashboard. on_layout_change (None): event triggered when the layout changes - on_close_item (None): event triggered when an item is closed + on_add_item (None): event triggered when an item is added + on_remove_item (None): event triggered when an item is closed """ def __init__(self, **kwargs):