Question T14982
Visible to All Users

Dropdown - Error on selecting dropdown after searching a value with no matching data (Lazy Loading)

created a year ago

Hi SurveyJs team,

I'm implementing the lazy loading of API for dropdown JS. But I noticed a behavior on the dropdown, where it throws error after searching a value that have no matching results and re-selecting the dropdown.

Here are the steps to replicate:

  1. Go to https://codesandbox.io/s/g9qn2g?file=/src/json.js from the https://surveyjs.io/form-library/examples/lazy-loading-dropdown/reactjs#content-code
  2. Select a country from the dropdown.
  3. Type any string that have no matching results. For example: 00000
  4. From step 3, it will display 'No result'
  5. Hover out or remove the focus to the dropdown.
  6. Select the dropdown again

Result: Error is displayed
Cannot set properties of undefined (setting 'selectedValue')
./src/dropdownListModel.ts.DropdownListModel.beforeScrollToFocusedItem

see screenshot for full error

Appreciate your response and assistance.

Thank you!

Comments (2)

    Hello,
    Thank you for reporting this issue. We will investigate it and post updates in the following GitHub thread: https://github.com/surveyjs/survey-library/issues/7114.

    Please stay tuned.

      Hello Eleazar,
      We released v1.9.112 and it seems that the issue gets resolved. Would you please test it on your side and let us know whether you can reproduce the issue? You can test the Dropdown demo as it uses the most recent version.

      I look forward to your reply.

      Answers

      created a year ago

      Thank you Jane and for the SurveyJS team. I tested on the sandbox and I didn't encounter the error.

        Comments (1)

          Thank you for the confirmation. We are happy to hear that the issue is resolved.

          Should you have any further questions, we are here to help.