Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Jul 16, 2024
1 parent 06b0975 commit fe6a4c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions app/packages/operators/src/built-in-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ class SetPanelState extends Operator {
return { updatePanelState: useUpdatePanelStatePartial() };
}
async execute(ctx: ExecutionContext): Promise<void> {
debugger;
ctx.hooks.updatePanelState(ctx, { targetPartial: "state" });
}
}
Expand Down
2 changes: 0 additions & 2 deletions fiftyone/operators/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions fiftyone/operators/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit fe6a4c5

Please sign in to comment.