surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.02k stars 785 forks source link

Dropdown simultaneously displays predefined choices and auto-generated items #8243

Closed JaneSjs closed 1 month ago

JaneSjs commented 2 months ago

If you create a Dropdown question in a creator, it has some preconfigured choices. image

Now, if you specify the min and max values for auto-generated items: image

A Dropdown will display preconfigured and auto-generated items.

{
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question1",
     "choices": [
      "Item 1",
      "Item 2",
      "Item 3"
     ],
     "choicesMin": 1,
     "choicesMax": 10
    }
   ]
  }
 ]
}

image image

Is it the expected behavior?

JaneSjs commented 1 month ago

Solution: manually remove the preconfigured items and keep only auto-generated ones.

{
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question1",
     "choicesMin": 1,
     "choicesMax": 10
    }
   ]
  }
 ]
}