Corran
Corran
SSolara
Created by Corran on 3/8/2024 in #questions-issues
Using vue libraries with ipyvuetify & solara
3 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Ah I see, makes sense. Looking back at the example, I see they do actually have a data file at the top level which seems to be doing the same thing. Ill define them in a seperate file like this and just import them from there. Thanks for the help and suggestion!
23 replies
SSolara
Created by Stefan on 2/10/2024 in #questions-issues
Need help with ipyleaflet
Ah hrm, thats frustrating
6 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Sorry, I'm probably misunderstanding the scope of reactive variables
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
i.e.
#01-page.py
import solara
v = solara.reactive(0)

@solara.component
def Page():
v.set(1)

#01-page.py
import solara
v = solara.reactive(0)

@solara.component
def Page():
v.set(1)

#02-page.py
import solara

@solara.component
def Page():
solara.Markdown(f'{v}')

#02-page.py
import solara

@solara.component
def Page():
solara.Markdown(f'{v}')

When running solara run . in the Project I get an error like this: File "C:\Users\Corran\Project\02-page.py", line 7, in Page solara.Markdown(f'{v}') ^^ NameError: name 'v' is not defined
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Also, another noob question 😅 . I'm testing running a multipage app using solara server, I'm trying to define global variables in a py file with variable=solara.reactive(), however this doesn't seem to make them available to pages in other .py files
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
import solara
import reacton.ipyvuetify as v


i = solara.reactive(0)

@solara.component
def AC():
def function():
i.value = 1

institution, set_institution = solara.use_state("")
institutions, set_institutions = solara.use_state([])

auto = v.Autocomplete(
itemText="Description",
vModel="Value",
label="Institutions",
placeholder="Start typing...",
filled=True,
items=institutions,
dense=False,
clearable=True,
no_filter=True,
auto_select_first=True,
no_data_text=f"No matches found",
on_value_change=function(),
)
v.use_event(auto,"update:search-input",function)

@solara.component
def Page():
v.Container(
children=[AC(),solara.Markdown("hi!")]
)

Page()
import solara
import reacton.ipyvuetify as v


i = solara.reactive(0)

@solara.component
def AC():
def function():
i.value = 1

institution, set_institution = solara.use_state("")
institutions, set_institutions = solara.use_state([])

auto = v.Autocomplete(
itemText="Description",
vModel="Value",
label="Institutions",
placeholder="Start typing...",
filled=True,
items=institutions,
dense=False,
clearable=True,
no_filter=True,
auto_select_first=True,
no_data_text=f"No matches found",
on_value_change=function(),
)
v.use_event(auto,"update:search-input",function)

@solara.component
def Page():
v.Container(
children=[AC(),solara.Markdown("hi!")]
)

Page()
23 replies
SSolara
Created by Stefan on 2/10/2024 in #questions-issues
Need help with ipyleaflet
Could you replace the circle with an image? https://ipyleaflet.readthedocs.io/en/latest/layers/image_video_overlay.html Im not sure if the images support rotation though if you needed to rotate the map and have the compass rotate too
6 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Sorry this threads a bit of a mess 😅 . I should have proofread my messages better and like Stefan said, provided the code in a better way. I'm probably missing something obvious so Ill just spend more time with the documentation.
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
I think its pasted into an IDE the same way
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
Its the same as this, I just didnt include the imports before.
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
No description
23 replies
SSolara
Created by Corran on 2/10/2024 in #questions-issues
Using use_effect
The use_event function is what I'm trying to get working here
23 replies