Select to view content in your preferred language

Changing Calcite Tab Programmatically

194
2
Jump to solution
07-19-2024 02:59 PM
MichaelSnook
Occasional Contributor III

Hi All

I'm in the process of possibly migrating our jQuery based UI with Calcite.  I can't seem to figure out a VERY simple thing -- how to change a Calcite tab programmatically via code.  jQuery is simple and has built-in functions to do this but for the life of me can't seem to find any documentation for this.  Is this available yet?  Do I need to roll my own functions to accomplish this?

Any tips would be great.

Thanks!

 

1 Solution

Accepted Solutions
DitwanDPrice
Esri Contributor

Hey Michael, 

Hopefully this Codepen helps to get you what you're looking for. I believe just setting the `selected` property on the the `calcite-tab-title` that you want to be active using JavaScript should do what you want. 

View solution in original post

2 Replies
DitwanDPrice
Esri Contributor

Hey Michael, 

Hopefully this Codepen helps to get you what you're looking for. I believe just setting the `selected` property on the the `calcite-tab-title` that you want to be active using JavaScript should do what you want. 

MichaelSnook
Occasional Contributor III

I guess I was way overthinking that one!  Thanks!

0 Kudos