-
Notifications
You must be signed in to change notification settings - Fork 113
Feature request - ConfigManager #100
Comments
It seems, that aaronse realized something like that: |
That is right, he worked on some of that functionality, and proposed it in #44, but the pull request was mixed with other things. I agree that this is still a nice addition. |
Yes, it will be perfect eg. timezone selection and many other drop-down options. |
Will try to take another look at this over the weekend. I need to sync and pull latest edits from master for current ESP32 based project am working on. |
Given that there was not much action on this item, I have added a drop down menu option in commit c7d6e45 For |
Hey, many thanks for that! Because I must Label like this: You will find that in TZ.h as well. |
I would propose to add this as a field optionLabels in the JSON file. The implementation should be quite straightforward. If you or somebody else will add this in a pull request I'll happily merge it to the master. |
I will try this. Hope I get it running. |
@maakbaas |
Can you give me some hints how to implement that? |
Is your code somewhere on GitHub to see what you tried? |
No, because it´s not working. Im not firm with react and don´t know where to change the functions for "optionLabels". Tried to change the HTML part in ControllItem.js but this don´t worked. I got the "optionLabels" in source code of web-page in same struct as the "options" but the web-page always displayed the option istead of "optionLables". Im only edited the ControllItems.js. |
I've implemented optionLabels with #120, but as this is my first attempt at React, it might need additional work. |
Hi Maakbaas, I'm trying to implement your drop down option, but it doesn't seem to be working. I'm running 1.9.0 I added the entry below to my configuration.json file but it shows up as a standard text field. There must be something I'm missing. Any help would be greatly appreciated. Thanks, {
|
Should be |
Hi Maakbaas, Today I reinstalled everything from scratch on a clean Windows system. (I was using Ubuntu) I installed 1.9.0 from your .zip file in case there was a possible problem with git. All of my npm packages are installed properly, and my html is getting rebuilt correctly by your build system. Everything works fine until I add "control": "select" to configure.json. It compiles fine without errors, but when I load the GUI from the target, the Configuration page hangs, and nothing is displayed. When "control": "select" is removed, the page loads fine from the target, but I'm not getting my pull down field that I'd like. |
I figured out my problem. If you leave out the optionlables field, the Web browser will throw the following error:Uncaught TypeError: c.optionLabels is undefined This is only seen using the inspector. Once I added that field, works like a champ! Thanks for your help, and thanks for all of your hard work on this project. |
Can you paste the part of configuration.json with the correct optionlabel, please? |
Hi Eisbaeeer, This is what got it working for me. I copied from an earlier post in this thread...I had to put it into a text editor to clean it up a bit. It's not the greatest example due to the crazy characters, but it will get you going! "name": "Time_Zone", |
Thank you. He, he. You use it for the same case as I will use it. |
Thanks for the feedback. That should not be the case. I will re-open this issue, and make sure that there is no error when no optionLabels are present. |
Hi Eisbaeeer, This is what got it working for me. I copied from an earlier post in this thread...I had to put it into a text editor to clean it up a bit. It's not the greatest example due to the crazy characters, but it will get you going! "name": "Time_Zone", |
Yes, this seems to be the case. No worries about this bug from my end, because I plan to use the optionLabels for my project. |
I can confirm the reported issue from @perkinsinnovation. You have to define always both. "options" AND "optionLabels" in all select definitions. Im relaxed, too, because it is no "showstopper" if you know about that. |
Fixed it |
I´m loving your work. This framework is great.
Is it possible to get a "drop-down" option in configManager.
I´l provide the time-zones for time-sync in configManager. In this case it will be perfect if the user is able to select his timezone by drop-down list.
A drop-down list is really missing ;-)
Greets Lars
The text was updated successfully, but these errors were encountered: