s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266
https://valencia.lbsfilm.at/midterm-presentation/
Other
896 stars 166 forks source link

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

Open cledic opened 9 months ago

cledic commented 9 months ago

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 commented 9 months ago

Hello!

ESPUI.updateSelect(select_id, "value");

:-)

Have a good day! Marc.

cledic commented 9 months ago

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 commented 9 months ago

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