Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I change the default option in a "Select Control" #268

Open
cledic opened this issue Nov 19, 2023 · 3 comments
Open

How can I change the default option in a "Select Control" #268

cledic opened this issue Nov 19, 2023 · 3 comments

Comments

@cledic
Copy link

cledic commented Nov 19, 2023

Hello to all,
I need to change the default option inside a "Select Control", based on the choices of other controls.
The solution I found is to delete all the "options" and rewrite them in the new order. But I haven't tried it yet..
Is there a different solution? Can I set an option to appear as default?

Best Regards
Clemente

@nodoubtman
Copy link

Hello!

ESPUI.updateSelect(select_id, "value");

:-)

Have a good day!
Marc.

@cledic
Copy link
Author

cledic commented Nov 19, 2023

Aaaah what a misinterpretation!
I was convinced that the command changed the visualized text of the option. Instead it does what I need!

Many many thanks Marc,

Best Regards
Clemente

@nodoubtman
Copy link

You are welcome, if any other question, you can ask .... i'm here to help.
I have done many projects with ESPUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants