Skip to content
Discussion options

You must be logged in to vote

I think your custom this.listenTo(this.model, 'active', this.clearParent()) might cause an issue here, you don't actually need it as you can simply indicate onActive method in your view and it will be triggered on activation.
You can also try to remove the whole content of the closest text and re-append the current component, so it would look like this:

onActive() {
  const closestType = this.model.closestType('text');
  if (closestType) {
    closestType.empty();
    closestType.append(this.model);
  }
},

and I don't think you need updateProps either, if you're using the latest version, the text component should keep the reference of its children components.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@craigharman
Comment options

Answer selected by craigharman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants