Closed edwardrbaker closed 6 years ago
@erbaker I have added a unit test and could not reproduce the issue. I have created an example and it works fine: https://plnkr.co/edit/37RmsmKLJjtuY0pvcp5a?p=preview You do not use the https://restcountries.eu api correctly.
Thank you, Andrew
The issue isn't the implementation of the REST API; I have updated your plunkr: https://plnkr.co/edit/3PZPEQwIBWAqM6wDXNlK?p=preview
I would expect that "Chad" is selected in the countries box by default.
Here is the same plunkr from above but with version 0.12.36
To narrow it down a bit more, it looks like this bug surfaced in the changes from v1.0.1 to v1.0.2.
@erbaker @mdickin I have fixed the bug. Unfortunately I could not reproduce it in Unit Test. I have added in TODO to add a functional test (TestCafe test). The bug was here all the time in knockout version. We built jQuery based on react version by using preact. Since couple months ago jQuery is built based on knockout version.
Here is what happend. knockout clears a question value on empty dropdown. We have written a workaround for this, but this workaround doesn't work correctly when the value is setting onLoading survey via defaultValue. I have updated our work-around.
The update will be available on the next week.
Thank you, Andrew
Thank you for the quick turnaround, @andrewtelnov!
This is a bug report for a dropdown when a defaultValue is provided along with a choicesByUrl. On initial page load, the defaultValue is not selected from the list after the choices are loaded. Our example has a static list and a dynamic list for you to compare
https://plnkr.co/edit/DNJt35sNZ0rNbZ0YklyA?p=preview
Thanks!