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

Add helpers for adding a component at a specific position #4321

Closed
Legioth opened this issue Jun 25, 2018 · 3 comments
Closed

Add helpers for adding a component at a specific position #4321

Legioth opened this issue Jun 25, 2018 · 3 comments
Assignees
Milestone

Comments

@Legioth
Copy link
Member

Legioth commented Jun 25, 2018

Prior framework versions have addComponentAsFirst(Component c) and addComponent(Component c, int index) methods in at least CssLayout, FormLayout, VerticalLayout and HorizontalLayout. Similar helpers should also be added to e.g. Div, FormLayout, VerticalLayout and HorizontalLayout.

@pleku pleku added the DX label Jun 25, 2018
@pleku pleku added this to the 1.1 milestone Jun 25, 2018
@caalador
Copy link
Contributor

Ties into: vaadin/vaadin-ordered-layout-flow#64

@gilberto-torrezan
Copy link
Contributor

How should this behave when some children of the container are defined on a template file?

@Legioth
Copy link
Member Author

Legioth commented Jun 25, 2018

@gilberto-torrezan A good start would be that it works in the same way as if using the existing Element API for adding a child at index 0. If necessary, the Element API could then be tweaked to better deal with the situation.

@ZheSun88 ZheSun88 self-assigned this Jul 5, 2018
ZheSun88 added a commit to vaadin/vaadin-ordered-layout-flow that referenced this issue Jul 5, 2018
@pleku pleku modified the milestones: 1.1, 1.1.0.alpha1 Jul 16, 2018
@pleku pleku closed this as completed Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants