Code Monkey home page Code Monkey logo

Comments (11)

mitar avatar mitar commented on May 22, 2024

Care to explain why you need access to view? I hopped I already abstracted all use cases away. :-) And that you would not have to think about template instances and views at all anymore.

from meteor-blaze-components.

bensmeets avatar bensmeets commented on May 22, 2024

Sure, it's because of the Blaze.remove() as mentioned here #36 . I wanted to be helpfull and group some feedback in the Q&A thread, but as I respond now I guess it's making a bit of a mess of the issues :).

So plz remove if needed.

from meteor-blaze-components.

mitar avatar mitar commented on May 22, 2024

I still do not get you. You render manually and you cannot keep the view object around, so you would like to be able to get it yourself from the component later on again?

from meteor-blaze-components.

bensmeets avatar bensmeets commented on May 22, 2024

Yes, but just to be able to pass it on to Blaze.remove(). I use componentChildren() to find out all existing "panels" inside a viewstack component of mine. Having the component works, than just need to get the view of that component to be able to remove it once I click a "close" like button from within that panel.

from meteor-blaze-components.

mitar avatar mitar commented on May 22, 2024

Hm, should this be BlazeComponent.remove(componentInstance) or componentInstance.remove()? :-)

from meteor-blaze-components.

bensmeets avatar bensmeets commented on May 22, 2024

instance.remove() has a nice feel to it. Makes more sense to me than BlazeComponent.remove() which only has going for it that it matches Blaze, but Blaze has no (apparent) parent/child relationships to factor in (as far as I know). Calling remove on the parent is more specific.

from meteor-blaze-components.

bensmeets avatar bensmeets commented on May 22, 2024

On reading it again, I didn't get your comment correctly. There is one more (which I thought you meant):

  • calling parentInstance.remove(childInstance);

from meteor-blaze-components.

mitar avatar mitar commented on May 22, 2024

Yes. I thought more like instance.removeItself().

Good idea to remove children.

from meteor-blaze-components.

mitar avatar mitar commented on May 22, 2024

But probably it is better to remove itself, because you can always first access the child though componentChildren. Otherwise one cannot remove the root itself.

from meteor-blaze-components.

bensmeets avatar bensmeets commented on May 22, 2024

true. sounds good!

from meteor-blaze-components.

mitar avatar mitar commented on May 22, 2024

Implemented as instance.removeComponent().

from meteor-blaze-components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.