mirror of
https://github.com/s00500/ESPUI.git
synced 2024-12-23 05:50:49 +00:00
Realign with upstream
This commit is contained in:
parent
0ab401c3b1
commit
7e5331d54f
@ -1035,17 +1035,21 @@ Control* ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, Control* con
|
||||
if (control->elementStyle != 0)
|
||||
item["elementStyle"] = String(control->elementStyle);
|
||||
|
||||
if (control->parentControl != Control::noParent) {
|
||||
if (control->parentControl != Control::noParent)
|
||||
{
|
||||
item["parentControl"] = String(control->parentControl);
|
||||
}
|
||||
|
||||
// special case for selects: to preselect an option, you have to add
|
||||
// "selected" to <option>
|
||||
if (control->type == ControlType::Option) {
|
||||
if (ESPUI.getControl(control->parentControl)->value == control->value) {
|
||||
if (control->type == ControlType::Option)
|
||||
{
|
||||
if (ESPUI.getControl(control->parentControl)->value == control->value)
|
||||
{
|
||||
item["selected"] = "selected";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
item["selected"] = "";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user