[Vuejs]-Vue styling with a method

2👍

Try out a computed property with parameter like :

needsApprove() {
   return articel=>article.amendments.some(am=>am.approved==0)
}

2👍

Boussadjra Brahim answered how to fix it but did not explained why it does not work.
forEach returns nothing and is used only to make certain action with every element of collection. To return something you can also use ‘every’ instead of ‘some’ to make sure that every element of collection satisfies the condition.

Leave a comment