FIO-9758: fixed an issue where interpolated content data is not displayed in PDF download #6035
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-9758
Description
What changed?
When the submission is rendered is PDF format, the formio-viewer sets the submission and after that waits until the dataReady promise is resolved. It appears that the dataReady promise is resolved for nested forms before the data is actually set because the data is considered to be ready when the subFormReady promise is resolved. Because of it, the pdf file can be generated before all submission data is correctly set and displayed.
This PR makes it so that the nested form data is considered to be ready when the subForm data is ready. This allows to wait until all nested form data is set and only after that the PDF is generated.
How has this PR been tested?
Manually + tests
Checklist: