s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266

Home Page:https://valencia.lbsfilm.at/midterm-presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Behind a grouped control other controls get disabled

TinkerSteve opened this issue · comments

Describe the bug
after pulling the latest version of this lib from github, trying to take advantage of the fix for #158

I see some regression in my project. After adding a grouped slider control the next control is still working but the 2nd next is disabled ... no way to enable.

To Reproduce
use some code along these lines:

uint16_t slider1 = ESPUI.addControl(ControlType::Slider,"s1","",ControlColor::None,Control::noParent,&cb);
uint16_t slider2 = ESPUI.addControl(ControlType::Slider,"s2","",ControlColor::None,slider1,&cb);
uint16_t text_id = ESPUI.addControl(ControlType::Text,"Schedule","",ControlColor::None,Control::noParent,&cb);
uint16_t slider3 = ESPUI.addControl(ControlType::Slider,"s3","",ControlColor::None,Control::noParent,&cb);
// ESPUI.setEnabled(slider3, true); // won't change anything
while (1)

Expected behavior
I would expect slider 3 enabled and functional.


Desktop (please complete the following information):

  • OS: Win10
  • Browser firefox [97.0 (64-Bit)] , edge[ 98.0.1108.50]

Additional context
fails at commit e3e5c34
works at 7dcf6a1

Apologies, I must have missed something. I'll address ASAP.

No need to apologize, I am happy you provide this nice and easy to use library. Also no hurry ...

I think I see the issue. Seems that I didn't initialise the enabled value in the Control object. Silly me. Can you see if the commit above addresses this? It's hard for me to recreate, but I assume this is the problem.


I can confirm this is fixed on the branch above.

Thanks for helping out that fast.