Skip to content
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

Fix the align of the dropdown when expanded in ClayDropdown | Fixes #452 #482

Merged
merged 2 commits into from
Jan 26, 2018

Conversation

matuzalemsteles
Copy link
Member

No description provided.

@jbalsas
Copy link
Contributor

jbalsas commented Jan 26, 2018

Hey @matuzalemsteles, rather than listening the rendered on the portal, could you try listening on the expandedChanged event in the component?

this.on('expandedChanged', this.handleRenderedPortal_.bind(this));

@matuzalemsteles
Copy link
Member Author

hey @jbalsas, The problem is that I need to know when the show class is visible in the DOM, so I can switch to Align.align, so it can see clientWidth ... See #452 and metal/metal.js#351

@jbalsas
Copy link
Contributor

jbalsas commented Jan 26, 2018

Hey @matuzalemsteles, yeah, I'm here with @Robert-Frampton trying to come up with alternatives.

We assume you've tried writing this directly in the rendered lifecycle of this component and it doesn't work either because the portal might not have been redendered yet?

@matuzalemsteles
Copy link
Member Author

Oh, Yeah. When I use rendered in ClayDropdownBase and make some changes to expanded that is used inside the content of ClayPortal, rendered is called but has not yet been reflected in the DOM which is kind of weird that a bad perception. But by listening to the rendered component of the ClayPortal component I can tell when the content was actually rendered in the DOM.

@jbalsas
Copy link
Contributor

jbalsas commented Jan 26, 2018

Sounds good then, merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants