lundi 22 novembre 2021

Open one component instance at a time in Ember Octane

Let's say we have component answer that has isOpen property. By default isOpen is false and when the user is clicking on the answer we are changing the isOpen to true.

We are showing the list of answers. How can we close the first answer when the user clicks on second answer?

I was thinking about creating a service answersSync with globalIsOpen = false.




Aucun commentaire:

Enregistrer un commentaire