although I’m reading for quite a while, this is my first post, so I’m new to the community, welcome everyone, and thanks already for the great post I read so far!!
I hope my topic is in the proper section, otherwise pls. let me know.
my issue:
I’m trying to create a custom HABPanel Widget for selection. Actually I want to use a String item which holds various values sperated by a comma. My custom widget should open a modal window, read this item state, split it’s state by the comma, offer several button (depended on the amount of comma-seperated values) and update another item with the selected value). So far so good, my code does this, but the modal window stays open after a button click.
I would say start with this code and alter it for your needs.
Basically you create a container that has a visibility of hidden. Then you have that .container .active which has a visibility of visible. when the button is clicked, it adds a class called .active which makes the visibility visible. and when you click anything in the modal. it removes the .active component which makes the container not visible again.
the cool thing for me, in the item “All_Categories” i have a comma separated list like (1=test1,2=test2,3=test3). The Elements are shown as buttons, and clicking one will push this value to item “Selected_Category”. So actually I now have a more flexible Selection-Widget, since I can control the elements dynamically via an item.
It still looks a bit strange (copy and paste of various things ) If so