Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown with Lazy Loading - A list of items display duplicate entries #9111

Open
JaneSjs opened this issue Nov 27, 2024 · 0 comments
Open
Assignees
Labels
bug user issue An issue or bug reported by users

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Nov 27, 2024

T20690 - Dropdown with lazy loading duplicates choices
https://surveyjs.answerdesk.io/internal/ticket/details/T20690


To reproduce the issue, modify the skip (0) and take (5) parameters of the Lazy Loading function: View Demo.

survey.onChoicesLazyLoad.add((_, options) => {
      if (options.question.getType() === "dropdown" && options.question.name === "country") {
        const url = `https://surveyjs.io/api/CountriesExamplePagination?skip=0&take=5&filter=${options.filter}`;
        sendRequest(url, (data) => { options.setItems(data.countries, data.total); });
      }
});

Start entering a search criteria. You can see that an item list is duplicated.

image

2024-11-27_16-34-40.mp4
@JaneSjs JaneSjs added bug user issue An issue or bug reported by users labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users
Projects
None yet
Development

No branches or pull requests

2 participants