I have a listview component with a dynamic amount of containers. I got to populate a table with data that comes from a container, but i need to improve the user experience by changing the header color of the container used to populate the table, so the user can get where comes the data. Is there a way to make something like a highlight of the selected container?. Thanks for your support!!!
Yes i know that. What i want is to change the color of the selected container not all the containers, the container on which i clicked to got the data, keeping the other containers with their default header color.
In that case, I would probably use a variable to track the clicked item. You can have an event on the container that triggers on click and sets the variable to the clicked item. Then, in the setting that @whynot mentioned, you can a ternary that checks if item === the variable's value.
Hello Tess, how are you?. I already tried it, without success.
I already tried it without success. What I did was the following:
Define a variable of type boolean called sw with initial value false
Defines a variable that contains the final value of the container header color. This variable is called default_color
Create a click event that, when triggered on the container, changes the value of sw to true and in the header color of the container changes it to the color of the variable if the condition of sw is true is met in this way: { { sw.value ? default_color.value:'FFFFFF' }}
It effectively changes the color, but not only of the container on which the click was made, but it changes the color of all the containers, which is not what is desired.