mozbrick / brick

UI Web Components for Modern Web Apps
http://mozbrick.github.io/
Other
2.97k stars 205 forks source link

brick-menu inside of brick-deck does not render initially #234

Closed robdodson closed 10 years ago

robdodson commented 10 years ago

If I have a brick-menu inside of a brick-deck I need to toggle the deck card offscreen and then back on to actually see the menu

potch commented 10 years ago

@robdodson make sure you have the card you would like selected by default. If it's still not working, will investigate.

robdodson commented 10 years ago

ah ok that fixed it. I think I only had selected-index set. Is there a reason why I need to set both attributes? It seems like I'd always want selected-index and selected to match the same element. Could selected-index just place selected on whichever child matches the index when it starts up?

potch commented 10 years ago

We'll fix brick-deck so if either is set at initialization, the other will be properly initialized.

kentaromiura commented 10 years ago

This has been fixed through https://github.com/mozbrick/brick-deck/commit/e4c9cd2ee144a062efa40f0d86df9203d486b0ab and https://github.com/mozbrick/brick-deck/commit/ce6dfc9ea3e5ab22dcc7e35a8fcf4ba4a3756a6e

now you can either use selected-index or just place a selected attribute to any child.

robdodson commented 10 years ago

Awesome, thanks!