cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Button Color on click and keeping the color till other button is clicked

adityabehera2002
Explorer
0 Kudos
146

Hello SAP Community,

I have created a button that is currently in white color. This button serves as a filter, activating the filter when clicked.

My query is: If I click on the button, the button should be coloured, and it should remain coloured till another button is clicked. How can we achieve this in SAP SAC Optimized story?

Capture.JPG

View Entire Topic
ihar_stankevich
Explorer

Hi @adityabehera2002 

You could achieve it through CSS.

Step 1

Create 2 CSS:

ihar_stankevich_0-1743020992696.png

write your background color

Step 2

for Running button onClick event script:

this.setCssClass("button_status_color2");

for Closed button:

Running_Button.setCssClass("button_status_color");

 

Best regards,

 

adityabehera2002
Explorer
0 Kudos
Thanks for the solution! It worked perfectly, and I truly appreciate your help.