Totally! It was as simple as changing the HTML to that of a single select. I used this webpage as an example:
The tricker part of this is making it act like a normal widget where you can pass it a list of options. To do this I:
Added a Options prop
Added a function that is called every time options changed
3.This function first cleared out the list of options
This function then added each option back.
Feel free to explore the code!
Note: This widget didn’t go through the code review process a normal Tulip Library Plugin would, use it at your own risk customWidget-Disable Single Select.json (3.1 KB)
Reading this post I think it is obvious that we can achieve a lot by using custom widgets, but the original suggestion by simple configuration to hide existing pre-delivered input widgets using simple boolean variables is still very much relevant.
To get around it we e.g. make buttons transparent and make sure the trigger does not fire if transparent. Or we duplicate the step to make specific fields greyed out and place a box on top so they cannot be used to give the end user the feeling of specific fields made irrelevant for the data entry when not required. Managing this without resorting to custom widgets would still make sense to me.
Please vote for this product suggestion if you agree
Totally agreed. This request has languished for some time because the right way to solve this is to enable a whole bunch of widget properties to be driven dynamically:
Focus
Disabled/Enabled
Hidden/Unhidden
Widget-specific properties, like labels
etc.
It’s a balancing act between a quick win and a long-term vision. We don’t want to build a point-solution without considering the longer-term gaps we want to fill. The underlying need for this sort of flexibility is something we are actively tracking, and a lot of thought is going into the right way to approach this problem.
To me this shows there is a strong wish, but some do not use the search before posting, so there are several threads, that could be closed and linked to this one or so…
Hi all,
We hear you and appreciate the helpful discussions and follow ups. Sharing an update that the team is planning to work on adding Enable/disable functionality to some of our widgets in the next few quarters. Stay posted!
Hi all- I’m happy to post that enabling buttons is now possible as of r274/LTS12. This solves many of the use cases of this thread. Hiding widgets is still not supported and not something we plan to add. I am going to close out this thread, we can open a new thread for any areas that need further discussion.