QuestionDropdownModel

A class that describes the Dropdown question type.

View Demo

allowClear property

Specifies whether to display a button that clears the selected value.

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionDropdownModel

Specifies whether users can add their own choices if the desired option isn't available in the dropdown.

Default value: false

View Demo

Custom choices will only be stored temporarily for the duration of the current browser session. If you want to save them in a database or another data storage, handle the onCreateCustomChoiceItem event.

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionDropdownModel

Enables lazy loading. If you set this property to true, you should implement the Survey's onChoicesLazyLoad event handler.

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionDropdownModel
See also:
choicesLazyLoadPageSize * , SurveyModel.onChoicesLazyLoad

Specifies the number of choice items to load at a time when choices are loaded on demand.

Default value: 25

This property does not accept values below 25 to prevent the server from being flooded with requests.

Type:
number readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
25
Implemented in:
QuestionDropdownModel
See also:
choicesLazyLoadEnabled * , SurveyModel.onChoicesLazyLoad
choicesMax property

Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].

"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10
Type:
number readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionDropdownModel
See also:
choicesMin * , choicesStep
choicesMin property

Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].

"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10
Type:
number readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionDropdownModel
See also:
choicesMax * , choicesStep
choicesStep property

Use the choicesMin, choicesMax, and choicesStep properties to generate choice items automatically. For example, the configuration below generates three choice items: [10, 20, 30].

"choicesMin": 10,
"choicesMax": 30
"choicesStep": 10

The default value of the choicesStep property is 1.

Type:
number readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
1
Implemented in:
QuestionDropdownModel
See also:
choicesMin * , choicesMax
placeholder property

A placeholder for the input field.

Type:
string writable

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Implemented in:
QuestionDropdownModel
searchEnabled property

Specifies whether users can enter a value into the input field to filter the drop-down list.

View Demo

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionDropdownModel
See also:
searchMode * , SurveyModel.onChoicesSearch
searchMode property

Specifies a comparison operation used to filter the drop-down list. Applies only if searchEnabled is true.

Possible values:

  • "contains" (default)
  • "startsWith"
Type:
"contains" | "startsWith" readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
contains
Accepted values:
contains , startsWith
Implemented in:
QuestionDropdownModel
See also:
SurveyModel.onChoicesSearch
selectedItem property

Returns the selected choice item. If no item is selected, returns null.

Type:
ChoiceItem readonly
Implemented in:
QuestionDropdownModel
textWrapEnabled property

Specifies whether to wrap long texts in choice options onto a new line.

Default value: true

Disable this property if you want the texts to be truncated with ellipsis.

Type:
boolean readonly

This property is stored in the survey JSON definition and can be edited in the Survey Creator.

Default value:
True
Implemented in:
QuestionDropdownModel

Send feedback to the SurveyJS team

Need help? Visit our support page

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.