-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kwargs to input components to pass to ipyvuetify #154
Comments
Hi, this issue was also raised in #50 Does this make sense? And are you ok opening a PR for a specific component you need? Regards, Maarten |
Hi Maarten, I'm not all that confident with type safety or making PR requests, but I think there's a better alternative to kwargs actually: based on the reacton API, there is a massive number of additional named/typed parameters that can be passed to its wrapper for TextField. I've tried copy-pasting the solara version with **kwargs into a notebook to try it, and it works for me. So, I imagine if the concern is that you need the named/typed arguments, you could just copy and paste the added arguments over from reacton over to where it's used in https://github.com/widgetti/solara/blob/master/solara/components/input.py (just the 2 instances of v.TextField). https://github.com/widgetti/reacton/blob/master/reacton/ipyvuetify.py line 6538 for TextField, and many of the other widgets have a similarly large number of parameters. Also, although this is not exactly relevant, would you happen to know if there's any reacton state/widget state and traitlet linking? implementing a callback with on_value works well enough. Currently I'm trying to go past ipywidgets (lacks the widgets and some of the customization I'd like, but I got used to the traitlets) but not have to deal with the kinda terrible documentation of ipyvuetify. |
You can still use the ipyvuetify components, in fact, we have solara.v as an alias for that. Solara provides its own components which are based on vuetify, but with a less overwhelming, more documented, opinionated and typed set of arguments compared to vuetify. Regarding the traitlets, could you maybe open a new issue for that, and maybe give some code example what you want to do, my guess is that you are not the only one who wants to do that. |
I am aware that the solara widgets are based on the ipyvuetify ones, but it's for precisely a lot of the reasons listed that I'd rather have the solara version, since ipyvuetify doesn't really have Text/Int/Float input fields, and relies far too much on vuetify for its docs, which are all in javascript. Aside from some input filtering, the solara input fields appears to be really just the reacton TextField, which appears to have a comprehensive list of additional parameters it can pass to ipyvuetify. Basically, I don't really want to use ipyvuetify at all, just have its UI elements. |
Some features like placeholders and hint text are found in the reacton ipyvuetify TextField that could be easily incorporated this way for all the input components based on it.
The text was updated successfully, but these errors were encountered: