Make the default depending on some value


I am trying to make the default option of an Dynamic array dependeble on an value. See the option below for an example I tried. But this an a lot of other options I tried, did not work. Is there a way to do this?


DynamicArray(“name”, default=[get_default()])

Hi Jip,

It is currently not possible to pass a callback as an argument to the default parameter.
Maybe you could use a SetParamsButton to fill your dynamic array?

Hi Yannick,

Will this be possible in the future?

Kind regards,

Hi Jip,

There is some feature requests in our pipeline that allow for more callback options in the params. However, interconnectivity between params can lead to unexpect behaviour and we don’t want to complicate the developer/user experience too much. If a set of values such as your array is very much dependent on params, and you want real-time updating (so without SetParamsButton) perhaps try a DataView?