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

PDF fails to generate when calling options.setItems with an empty array within the onGetChoiceDisplayValue function #280

Closed
JaneSjs opened this issue Sep 27, 2023 · 1 comment · Fixed by surveyjs/survey-library#7055
Assignees
Labels
bug user issue An issue or bug reported by users.
Milestone

Comments

@JaneSjs
Copy link
Contributor

JaneSjs commented Sep 27, 2023

v1.9.110

T14799 - Urgent Help needed - Issue with SurveyPdf
https://surveyjs.answerdesk.io/internal/ticket/details/T14799

@JaneSjs JaneSjs added bug user issue An issue or bug reported by users. labels Sep 27, 2023
@JaneSjs JaneSjs changed the title PDF is not generated on specific survey responses PDF fails to generate when calling the options.setItems with an empty array within the onGetChoiceDisplayValue function Sep 27, 2023
@JaneSjs
Copy link
Contributor Author

JaneSjs commented Sep 27, 2023

Lazy Loading works well when the onChoicesLazyLoad and onGetChoiceDisplayValue callbacks are correctly implemented: https://plnkr.co/edit/VcxFz2FR9xsYn7l2.

However, if the options.setItems is called with an empty array within the onGetChoiceDisplayValue event (https://plnkr.co/edit/AVHer6ZpExDYmlLs), a PDF is not generated.

const onGetChoiceDisplayValue = (_, options) => {
               options.setItems([], 0);
})

dk981234 added a commit to surveyjs/survey-library that referenced this issue Sep 29, 2023
@dk981234 dk981234 closed this as completed Oct 3, 2023
@RomanTsukanov RomanTsukanov changed the title PDF fails to generate when calling the options.setItems with an empty array within the onGetChoiceDisplayValue function PDF fails to generate when calling options.setItems with an empty array within the onGetChoiceDisplayValue function Oct 3, 2023
@OlgaLarina OlgaLarina added this to the v1.9.111 milestone Oct 3, 2023
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

Successfully merging a pull request may close this issue.

3 participants