Skip to content

Feature: Allow additional action(s) for a node #22

@jsolaas

Description

@jsolaas

We want to be able to add actions to nodes, i.e. when triggering an action on a node we want to open a separate page with more information.

  • We need to handle the action trigger outside the diagram component
  • We need to be able to only have the action available on some nodes
  • The info on which nodes should show the action should not be in the current flow diagram prop

My proposal:

Add a render prop that should be used to render actions for a node. This can probably cause some issues with size etc that we need to figure out.

An alternative is to specify an action

interface Action {
  icon: string;
  onClick: (node: Node) => void;
  nodeType: NodeType;
}

but then we need to make sure we can implement that action for all nodes of a type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions