Default Modal Approach
What's your default approach to functional modals?
For example I have a client master data card that shows the various addresses of a client. Now I want the "Edit" event (e.g. click on an icon or the address in question) to launch a modal (aka pop-up) for me to edit that one address and close it using a "save" or "cancel" event.
Which patterns or components are you using to do that. Is there an example you might have in store?
thx guys
-Tom
2 Replies
We do not have a Modal component, but the ConfirmationDialog can be nicely abused for this.
https://github.com/widgetti/solara/blob/master/solara/website/pages/api/confirmation_dialog.py seems to be a good pattern.
put the 'request' in the state (like a reactive variable), and once you confirm (save in your case), you actually perform the action. Does that make sense?
GitHub
solara/solara/website/pages/api/confirmation_dialog.py at master · ...
A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps - widgetti/solara
I certainly will try that kind of abuse. Thanks.