For this example, I tried to modify it to operate on a `traitlets.List`, which contains a list of di

For this example, I tried to modify it to operate on a traitlets.List, which contains a list of dictionaries. I get some odd behavior with it. If I modify the items in place, it seems to do some kind of partial update in the UI. What I am trying to do is create a card for each item in the list, but it doesn't create new cards as the list is extended. Any tips on how to modify this to get it to work?
12 Replies
Elder Millenial
Elder MillenialOP4w ago
It's like I need to draw everything, and then I'm allowed to update elements
milo907
milo9074w ago
Hello, how can I download Solara?
Elder Millenial
Elder MillenialOP4w ago
@Ben Epstein I tried out your long running task approach. I found a good way to launch it where it launches on page open but doesn't keep launching it on each re-render. Any tips on how to kill the task on page refresh or when closing the page? Is there something like an on_exit routine? Oh, I guess I could try using on_kernel_start Actually, I think the better option is to just shorten the websocket timeout
Ben Epstein
Ben Epstein4w ago
Hm @Elder Millenial I just decorated my async function with @task and it worked as expected. When I refreshed the page, the task restarted. In my Page component I just call the task function directly and it works. Was that not your experience?
Elder Millenial
Elder MillenialOP4w ago
It seems like the task keeps running after I close the page. When I refresh, it starts another task. So if I load a page, it starts. When I refresh, it starts a second one and the first one doesn't stop Yeah, it seems like setting a shorter websocket timeout seems to help shut down the runaway tasks It just takes some time Actually...I just rearranged my code a bit and it seems to be working better now. Very odd. Anyway, thanks for the responses Ben.
𝚁𝚊𝚝ã𝚘
i am new here, how i download the solara?
iisakkirotko
iisakkirotko3w ago
pip install solara if using pip, or conda/mamba install solara via those clients. Though I don't think this is the Solara you're looking for :)
cartel_takeaway
how do i install solara
atomwa
atomwa3w ago
where is solara exploit
iisakkirotko
iisakkirotko3w ago
Wrong server
izumi.qu
izumi.qu3w ago
Is there a way to add a feature to scan QR codes as input?

Did you find this page helpful?