ChoicesByURL not working in drop-downs within MatrixDynamic questions from release 0.12.6 onwards
See original GitHub issueAre you requesting a feature, reporting a bug or ask a question?
Reporting a bug.
What is the current behaviour?
When the drop-down is hooked up to a working URL (via Choices from Web) that returns the following JSON results, the drop down list is initially filled with the correct items, I choose one of the items and the drop-down field is blanked out (my choice is gone), if I then add another row and try and choose another item from the drop-down list, the list contains nothing…
Here is the JSON being returned to the drop-down from the API:
{ "results": [ { "id": "1", "value": "Site 1" }, { "id": "2", "value": "Site 2" }, { "id": "3", "value": "Site 3" } ] }
And here is the JSON config of the question (API URL replaced to protect the innocent):
{ type: "matrixdynamic", addRowText: "Add site", columns: [ { name: "site", title: "Site", cellType: "dropdown", choicesByUrl: { url: "<<API URL>>", path: "results", valueName: "id", titleName: "value" } } ], indent: 1, isRequired: true, name: "question-site", removeRowText: "Remove site", rowCount: "0", title: "Which sites?" }
What is the expected behaviour?
The drop-down should list the items from the JSON and when I choose one of the items it should be shown in the drop-down field.
How would you reproduce the current behaviour (if this is a bug)?
Running my application and referring to the survey CDN for release 0.12.5 produces a correctly behaving drop-down list, if I increase the CDN version the bug presents itself.
Provide the test code and the tested page URL (if applicable)
Difficult to provide the URL as the API is running locally inside my organisation.
Specify your
- browser: Chrome
- browser version: 57.0.2987.133 (64-bit)
- surveyjs platform (angular or react or jquery or knockout or vue): jquery
- surveyjs version: 0.12.6 onward
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
@gnimmelf I have updated the dev build. You may use
https://surveyjs.azureedge.net/dev/survey.jquery.min.js
for a while.Thank you, Andrew
Thanks again Andrew!