Is it possible to prevent the dropdown to open in the ComboBox?

1 Answer 68 Views
ComboBox
Ewald
Top achievements
Rank 1
Iron
Ewald asked on 10 Oct 2023, 07:19 PM
I have a ComboBox, and when the user opens it, I first want to execute some code that takes a while. Only when that code is completed, I want to open the dropdown. Is this possible?

1 Answer, 1 is accepted

Sort by
0
Wissam
Telerik team
answered on 11 Oct 2023, 01:52 PM

Hello, Ewald,

Yes this is possible by handling the opened state of the ComboBox component in controlled mode.

In the below example, I am setting the opened prop to the `open` state variable. In the onOpen event handler, I am setting the `open` variable to true. Before that, you can execute the needed code and if necessary set the `open` variable in a `setTimeout` method:

I hope this helps, but please let me know if you have any further questions.

Regards,
Wissam
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources!

Tags
ComboBox
Asked by
Ewald
Top achievements
Rank 1
Iron
Answers by
Wissam
Telerik team
Share this question
or