What I’m trying to do:
I have a parent component of type CardContentContainer where I nest a stream of child components [C1, C2, …]. A button press adds a new child component into the parent with add_component.
I would like the new component to be added to the top of the column, but I wasn’t able to find any docs that give this as an option.
A workaround that feels icky is to call card_container.clear(), add the newest child component then re generate and add the other child components.
Glad you solved this! However, using a FlowPanel with width='100%' isn’t necessary here – every container (and slot) has an index= parameter - you could do this with a LinearPanel, or with your custom container directly.
The documentation for the containers only listed index as an option for LinearPanel and FlowPanel, which was why I went with FlowPanel. E.g. Card did not have index as one of the possible keyword arguments Anvil Docs | m3
I assume it’s defined on the base class. Are the keyword args documented somewhere?