docs/versioned_docs/version-1.x.x/widgets/dropdown.md
The Dropdown widget can be used to collect user input from a list of options.
:::tip Dropdown options can be referred to your query data with dynamic variables. :::
<div style={{textAlign: 'center'}}> </div>On select event is triggered when an option is selected.
This event is triggered whenever the user searches through the options by typing on the dropdown's input box. The corresponding search text will be exposed as searchText.
The text is to be used as the label of the dropdown.
Value of the default option
Option values are values for different options in the list of the dropdown. Refer your query data with dynamic variables {{queries.datasource.data.map(item => item.value)}} or populate it with sample values {{[1,2,3]}}
Option labels are labels for different options in the list of the dropdown. Refer your query data with dynamic variables {{queries.datasource.data.map(item => item.label)}} or populate it with sample values {{["one", "two", "three"]}}
Show a loading state in the widget using this property. It is off by default, toggle on to enable it. You can also programmatically set the values {{true}} or {{false}} by clicking on the Fx button.
Add a validation for the options in dropdown widget using the ternary operator.
A Tooltip is often used to specify extra information about something when the user hovers the mouse pointer over the widget.
Under the <b>General</b> accordion, you can set the value in the string format. Now hovering over the widget will display the string as the tooltip.
<div style={{textAlign: 'center'}}> </div>Toggle on or off to display the widget in desktop view. You can programmatically determine the value by clicking on Fx to set the value {{true}} or {{false}}.
Toggle on or off to display the widget in mobile view. You can programmatically determine the value by clicking on Fx to set the value {{true}} or {{false}}.
Use this property to modify the border radius of the dropdown. The field expects only numerical value from 1 to 100, default is 0.
This is to control the visibility of the widget. If {{false}} the widget will not visible after the app is deployed. It can only have boolean values i.e. either {{true}} or {{false}}. By default, it's set to {{true}}.
Change the text color of the selected option in the widget by providing the HEX color code or choosing the color from color picker.
This property only accepts boolean values. If set to {{true}}, the widget will be locked and becomes non-functional. By default, its value is set to {{false}}.
You can align the text inside the widget in following ways: left, right, center, justified
:::info
Any property having Fx button next to its field can be programmatically configured.
:::