Replies: 1 comment 5 replies
-
There's no good way of doing that currently. But I'm working on v1.0 and the idea is to include a built-in switcher for that use case. Also, if you have more feature requests this is a great time to bring them up :) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a CH.Code with multiple code samples to be rendered as tabs. We are using each tab for a particular programming language:
![image](https://private-user-images.githubusercontent.com/1897006/284726885-8c815674-8eeb-46b8-a123-0e2544df3c11.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MTI1ODIsIm5iZiI6MTczODgxMjI4MiwicGF0aCI6Ii8xODk3MDA2LzI4NDcyNjg4NS04YzgxNTY3NC04ZWViLTQ2YjgtYTEyMy0wZTI1NDRkZjNjMTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMDMyNDQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDFkOWIxYTFiZGZiZjUyMmVmNmJhNDVhYjA1MTczZDVkNDhhMGY0NGM2MWI5NGZmYjlmZmQ5ODU3NzAzYmZhOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.N_WJGx18Xjzl61Ryr4RJZnQhJA8wvqKNCd8UlEfbECA)
What I'd like to do is pre-select a tab based on a previously saved programming language preference. I've tried wrapping the Code component to experiment like so:
It renders properly, but there doesn't seem to be a way to make the selected tab change.
In addition, I will need to be able to save their preference if they change tabs.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions