An alternative approach would be to build the interaction you want using "stand alone javascript" with any support library you want (like jQueryUI) and then connect the javascript component to Jupyter using proxy widgets. That is how I would approach it (but I'm a bit biased ;c) ).
Please see the proxy widget tutorial on how to do this. https://github.com/AaronWatters/jp_proxy_widget/blob/master/notebooks/Tutorial.ipynb Let me know if you have questions. -- Aaron Watters On Wednesday, December 26, 2018 at 9:35:00 AM UTC-5, Marine wrote: > > 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: > https://codeshare.io/2pmp4x > > Python: > https://codeshare.io/24Qy8L > > > I would be very grateful if one of you could help me with that ! > > > Thanks a lot > > > Marine > > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/875f66ec-9f78-4191-9d16-1e32a14a70d9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
