Hey all. I have this piece of code and
Hey all. I have this piece of code and can't quite seem to figure out why it's behaving the way it is.
Basically, I'm trying to create a grid where any button clicked calls a function with the associated grid postion. The problem is that when you click any button, it always uses the last x,y coordinates even though the UI seems to register the proper labels on each button
mariobuikhuizen•15d ago
Because in python x and y have the last value of the loop when the lambda is called
you can store the current values like this: on_click=lambda x=x,y=y: select_well(x, y)
Elder Millenial•15d ago
ARG, yeah, good call. I feel like a moron sometimes.
Thanks.
446Members
View on DiscordWant results from more Discord servers?
More Postsanaconda prompt launching py files errorI've complete my first solara page in jupyter notebook , and I pasted the code to a py files ,run thDoes anyone know how I might interactDoes anyone know how I might interact with anywidgets widgets in solara? I can make one:
```python
Common object across pagesI was wondering, what is a good way to share a common object across multiple pages, organized in sepInitializing function.Please help me make an initializing function.
I'm using the solara.use_router().search function to installation problem, outdated version solara-uipoetry add solara
Using version ^1.32.0 for solara
Updating dependencies
Resolving dependencies... Server routeI need to somehow change the state depending on the behavior of the external service, I think I needipyaggrid memory leakHi, I have an app that uses a few sizeable `ipyaggrid` grids (one per tab) that are leading to memorExtract the value from an ipywidgetHi all! I want to extract the value from an ipywidget but the values between the Solara app and the