You can do a conditional in the RG:
Assuming you’re storing the clicked cell’s index in a state (i.e.: selectedindex) - you set up the boundaries like this:
Hello and thanks for your support, I solved my problem and everything works very well… in the same way I also added the function to change color to the next 5 cells… but however it initialized me with the first colored cells and I set a new one condition so if index <1 then no background.
I would like to learn how to use all these functions and I would ask you to be kind enough to explain to me in detail the condition you suggested, so that I can understand it well and be able to use similar conditions later.
I repeat, it works perfectly, but I would like to better understand the meaning of each individual part of the function, thanks again
I didn’t understand this part, but great! If it works for you, it works. Though I don’t think you can get a selected index to be less than 1… Perhaps you should revisit that.
Sure!
You set a state to indicate which cell was clicked/is active.
The conditional is two parts, each a boundary.
If the current Cell’s index is 5 less than the selected index or more, conditional is true (change color or whatever you want)
If the current Cell’s index is less than the selectedIndex, conditional is true (so any cell starting at the selectedIndex or higher won’t be true)