Search Support
-
Saroj PandaFebruary 24, 2017 at 6:53 am #3831
How can I reset the selection of Single Select control. I have a Single Select with list of Strings as Input Data and have a string variable bound to it’s selected data. On first load the drop down is empty as expected, but once I select any value from list there is no option to clear the selection.
The only way to reset the selection is to by using setData() to reset the data provider, which itself seems to be confusing because as per documentation it should ‘Set/update bound data associated this view/control.’ but it’s updating the list data of the control which is defined in configuration.
SPARK SupportFebruary 24, 2017 at 4:09 pm #3842Hi Saroj,
I am looking at my Single Select Test harness, which initialized with a Static List of strings through variable testList. The control is bound to another String, selectedItem. When I call page.ui.get(“Single_Select1”).setData(“”), the selection in the drop down list is cleared. When I click on the Single Select, the full list of items remains available for selection.
If I am missing the issue here, please attach screenshots of the configuration and the issue that is resulting.
Regards,
Stephen P.
Saroj PandaFebruary 28, 2017 at 6:07 am #3882Hi Stephen,
Yes actually when I did another solution to replicate the setData(“”) behavior it worked as expected.
Before the setData([“option1″,”option2”]) was reseting the data provider because the binding variable was wrongly mapped to the same configuration variable 🙂
Regards,
Saroj
SPARK SupportMarch 3, 2017 at 11:19 am #3923Hi Saroj,
Calling setData(“”) is working correctly for you with the current version then?
Regards,
Stephen P.
Saroj PandaMarch 6, 2017 at 2:28 am #3939Yes it’s working as expected and I guess this is the option option to clear the selection in Single Select control 🙂
Thanks,
Saroj
SPARK SupportMarch 6, 2017 at 12:31 pm #3945Hi Saroj,
Thank you for your response. I am glad to hear it is working.
Regards,
Stephen P.
-
|
You must be logged in to reply to this topic.