-
Notifications
You must be signed in to change notification settings - Fork 141
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
Unable to change the width of individual widgets in a Row #560
Comments
Hi Dheepak, Note that we will have some docs on ipydatagrid soon: #531 But, I think using solara.Columns will in this case be easier, it will make the widths expand (by default). Hope that helps. solara.Row uses flexbox, and it depends in the flex-grow properties of the children (the datagrids) if they expand or not. Not a CSS expert thought (is this correct @iisakkirotko ?) cheers, Maarten |
Hi @kdheepak! @maartenbreddels is indeed correct. I would go about this by making the top element a @solara.component
def Page():
dg = ipydatagrid.DataGrid(df)
with solara.Row():
solara.Column(children=[dg], style={"flex-grow": "1"})
solara.Column(children=[dg], style={"flex-grow": "1"}) Let me know if that works! P.S. You can of course replace the |
Awesome! That seems to work great! I did try Thanks for the quick responses! |
I'm trying to plot a ipydatagrid widget in solara, and it works great when using
solara.Column
:but if I try to make the tables side by side, i.e. using a
solara.Row
, the individual widgets in this case collapse:Is there a way to make it equal in width? I tried
justify
asspace-evenly
and no luck. Here's the code to reproduce this:The text was updated successfully, but these errors were encountered: