In my latest project, I have successfully implemented a demo with three buttons dynamically generated using a for loop on the backend response.
Each button is clickable and toggles between active and inactive states upon click. However, I am seeking advice on how to modify the logic so that only one button can be active at a time (similar to a toggle button, but without the actual toggle functionality).
The goal is for selecting one button to automatically deactivate the other two. If you have any insights or suggestions, please refer to the code in the following demo: