Hello everyone,
I am currently working on a custom "list" widget where it is possible to append identical (duplicates) widget to the main widget.
I am struggling to get the initial state message from the kernel sent immediately after the comm-open message to be considered before I update the widget model.
In practice in debug mode using breakpoints I see my widget appear progressively but then the message "I don't have any children" is received and the model is updated with the value children={}.
The widget extends the Box widget.
Exemple of use:
test=ListAccordion(children=[Box(children=[Box(children=[Button(), IntSlider()]), IntSlider()])],layout=Layout(align_items='stretch', display='flex', flex_flow='column', width='available'))
display(test)
This is my code that recursively duplicates and appends the children widget to the custom "list" widget when the user clicks on the "+" button.
Javascript:
Python:
I would be very grateful if one of you could help me with that !
Thanks a lot
Marine