ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Internal issue 2792 - Setting ic-link "download" prop to true causes downloaded files to be named "true"

Open ticket-sync[bot] opened this issue 1 year ago • 1 comments

Setting the “download” prop of ic-link to true (or no value, using the default boolean prop behaviour) causes the downloaded file to be named “true”. This is due to the “download” attribute of the rendered tag to be set to the string “true” (and the value of that prop is used as the download’s file name - MDN docs).

If the “download” prop on ic-link is set to true, the rendered tag’s “download” attribute should be present with no value, i.e. . If set to a string, it should be passed through.

ticket-sync[bot] avatar Jul 19 '24 09:07 ticket-sync[bot]

This will also solve the issue in https://github.com/mi6/ic-ui-kit/issues/2082 around setting false still downloading the link, as it will no longer treat false as the file name

GCHQ-Developer-741 avatar Oct 10 '24 09:10 GCHQ-Developer-741