I’m not sure how I’d go about doing this or if it even is possible. I’d like to make a drop down (or checkmark button) where you can select Active, Inactive, Shutdown. And when choosing one it puts a green, yellow, or red circle beside a text?
Can be done, with a bit of JS code.
All you need to do is:
- create three circle components, give them the right color, set them all to “hidden on load” and place them one on top of the other at the location where you want them to appear
- listen to the onChange() event of your dropdown component.
whenever the selected value changes, use the hide() and show() APIs of the circle components to show the matching one.
You can read about the different APIs in our API reference page.
Give it a try and let us know if you managed to make it work.
Good luck!
Hey there,
Thank you for your response Ziv! I’ll see if I can find a way to do to as I know no Javascript. I will look at the API documentation and see if I can find anything!
Great! I intentionally provided a basic guideline instead of giving a complete code solution.
Play around, try it out, and I’m sure you’ll get this working in no time