Helleeni
SSolara
•Created by Helleeni on 9/16/2024 in #questions-issues
Solved: Can solara.Card(title="Long title to word wrap instead of wrapping mid word")?
Looks a little funny that longer titles on solara.Card wrap mid word rather than on whitespace. Any solution to this?
3 replies
SSolara
•Created by Helleeni on 9/13/2024 in #questions-issues
Solved: Solara example apps not working at the moment
Tried to study Solara example app https://solara.dev/apps/jupyter-dashboard-1 but it renders empty page (only empty page with 'This website runs on Solara' text).
I'm in MacOS Sonoma and Chrome browser.
Developer console shows:
mc-validate.js:195 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')
at Object.getAjaxSubmitUrl (mc-validate.js:195:14)
at mc-validate.js:351:11
at mc-validate.js:373:2
getAjaxSubmitUrl @ mc-validate.js:195
(anonymous) @ mc-validate.js:351
(anonymous) @ mc-validate.js:373
Edit 250915: Maybe it is because Solara.dev seems to be going through changes. Front page looks cool!
6 replies
SSolara
•Created by Helleeni on 9/3/2024 in #questions-issues
Disable "FileDownload" button once user has downloaded the file
Hi, I would like to disable to "FileDownload" button once the user has downloaded the file but struggling to find a solution.
Something along these lines:
def DownloadFile(file_object, file_name):
def done():
download_available.value = False
if download_available.value == True: with solara.FileDownload(file_object, file_name, mime_type="application/vnd.ms-excel", on_done=done): solara.Button("Download the result Excel", icon_name="mdi-cloud-download-outline", color="success")
else: solara.Button(label="Output excel not ready", color="warning") "on_done" parameter is not part of "FileDownload" - just added it to demonstrate what I'd like to do. Any advice as how this could be achieved?
if download_available.value == True: with solara.FileDownload(file_object, file_name, mime_type="application/vnd.ms-excel", on_done=done): solara.Button("Download the result Excel", icon_name="mdi-cloud-download-outline", color="success")
else: solara.Button(label="Output excel not ready", color="warning") "on_done" parameter is not part of "FileDownload" - just added it to demonstrate what I'd like to do. Any advice as how this could be achieved?
9 replies
SSolara
•Created by Helleeni on 8/22/2024 in #questions-issues
How to show progress of FileDrop?
Apparently solara.FileDrop can show the progress of the file being read. This would be great in my app as reading an excel file with few thousand lines can (in my setup) take minutes and it would be great to show progress to the user. I just can't figure out how it should be done?
Documentation says this:
@solara.component
def FileDrop(
label="Drop file here",
on_total_progress: Optional[Callable[[float], None]] = None,
on_file: Optional[Callable[[FileInfo], None]] = None,
lazy: bool = True,
):
I can't find any example as how to implement 'on_total_progress' part to show the progress. Any hint as how it should be done would be great.
3 replies