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

How to remove child view added by addChildren() #5405

Closed
oskarwrobel opened this issue Sep 19, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-ui#304
Closed

How to remove child view added by addChildren() #5405

oskarwrobel opened this issue Sep 19, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-ui#304
Assignees
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@oskarwrobel
Copy link
Contributor

It is possible to add a child view omitting ViewCollection. We do it eg in ButtonView
https://github.com/ckeditor/ckeditor5-ui/blob/606045953783b4ba5f90d7bac885e6efdb568b18/src/button/buttonview.js#L229-L235

addChildren() calls init on new view and register this view as a child thanks to this view will be destroyed together with its parent.

But there is no way to remove such a view before the parent will be removed. Something as removeChildren() is needed.

@oleq oleq self-assigned this Sep 19, 2017
oleq referenced this issue in ckeditor/ckeditor5-ui Sep 19, 2017
oskarwrobel referenced this issue in ckeditor/ckeditor5-ui Sep 19, 2017
Feature: Implemented `View#removeChildren`, the opposite of `View#addChildren`. Closes #303.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-ui Oct 9, 2019
@mlewand mlewand added this to the iteration 12 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:ui labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants