Auto-resize material design cards

I’d recommend you use GridPanels to cover cases where you’re aiming to resize/rebuild layouts on the fly. They’re much easier to interact with than ColumnPanels, so you wind up with friendlier and more flexible code. @meredydd offered some more context here: Add ColumnPanel Components In Code

I cloned your app and added a GridPanel to resize cards 1 and 2 when the date tree is toggled:

https://anvil.works/build#clone:XIKG7N5HW562HD4V=Z3L5DG4AHBY75Y3OWHXX5EJZ

Here’s how it looks:
ToggleDateTree

Is that what you were going for?


Edit: by the way I created a dummy user account for the clone since it was easier than removing the Users service. un: anvil@fakemail.com / pw: 12345. Heads up that sharing your app may share private data as well.

3 Likes