I need to calculate which class is belongs to every td in my table according to specific logic for every td.
I also need to detect changes and update the class if the data change
what is a best practice to do it?
example:
I have a cars signal data –
cars = toSignal(this.dataService.cars);
and I tried to write a computed like that:
carStatus: Signal = computed(() => this.calcStatus);
this work fine to the first TD but I want to compute also the color (for example)
should I write more computed function to the color calculation?
and what if I have 10 rows in the table?
how to calc the class for every td in every row?
ss.x is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.