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

AttachmentList option "includePDF" removes other attachments from AttachmentList.dataTypeIds. #1302

Open
OlaStalberg opened this issue Jul 3, 2023 · 3 comments
Labels
kind/bug Something isn't working

Comments

@OlaStalberg
Copy link

Description of the bug

When using AttachmentList-component the option "includePDF", doesnt seem to work as expected.
If the value "true" is added to the option "includePDF" it will ignore any other attachments from the AttachmentList.dataTypeIds.

Example: AttachmentList with dataTypeIds "datatype1, datatype2", will show a list of attachments with one attachment beeing datatype1 and one attachment is datatype2. If you add the option "includePDF: true" add "ref-data-as-pdf" to the dataTypeIds list, then it will ignore datatype1 and datatype2 from the attachmentlist view.

Steps To Reproduce

  1. Have your applicationmetadata.json include the standard "ref-data-as-pdf" with "enablePdfCreation": true.
  2. Add a component AttachmentList to a JSON Layout in ui/layouts
  3. Add an attachment ID to the AttachmentList (another then "ref-data-as-pdf").
  4. Add "ref-data-as-pdf" ID to the AttachmentList.
  5. Check result view and see that only the attachment that is not "ref-data-as-pdf" is shown in the list.
  6. Add the option includePDF:true to the AttachmentList.
  7. Check result view and see that only the attachment that is "ref-data-as-pdf" is shown in the list.

From my view you can not get both the attachment and the generated PDF to show up in the same list.

Additional Information

No response

@OlaStalberg OlaStalberg added the kind/bug Something isn't working label Jul 3, 2023
@OlaStalberg
Copy link
Author

image
image

Result:
image

@OlaStalberg
Copy link
Author

Based on the AltinnCDN I would expect the attachment list to show both the generated PDF and the attachments:
image

@olemartinorg
Copy link
Contributor

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants