Flowfunc:Dynamic Input Ports

FlowFunc is a brilliant component from @idling-mind based on Flume
One of the very few components introducing Visual Programming with Dash.

I greatly recommend anyone to check out the demo.

Is it possible to create ports on the fly?

A simple, fictive example could be to create a ‘concat string’ node.

It takes an undefined amount of strings as Inputs and concatenates them.

  • When created, the node starts off with 1 str input
  • Each time a str is entered (through connection or input port), a new input Port gets created on the fly.
  • a Port is removed, when clicking a cross or trash icon
  • allowing us to enter a 2nd str, and a 3rd,
  • a Port is removed, when clicking a cross or trash icon

A bit like the MultipleSelect Control but each item gets its dedicated Port and Control
(check color Port example)

Is this somehow possible with flowfunc?
If so, would we need dash callbacks or is this built into flowfunc?

This would greatly enhance potential usecases for flowfunc !

1 Like

I have added a feature where you can define Node.inputs as a javascript function defined in assets/*.js. Take a look at the solution for your problem here. Dynamic Input Ports · idling-mind/flowfunc · Discussion #14 · GitHub