Button component not rendering href
or download
attributes correctly
#2448
Labels
bug
Something isn't working
href
or download
attributes correctly
#2448
Please list the package(s) involved in the issue, and include the version you are using
Describe the bug
We are trying to create an Admin Action, to aggregate data (total SKU count, etc) from selected orders and download a CSV.
There are 2 issues with the
Button
component, both of which work correctly in the latest version of Polaris, but are not working inui-components
href
attribute (missing in output below)download
prop is not being passed as an attribute if a string is included (Ex.download="data.csv"
) even though the type is indicated asboolean | string
. See below that the download attribute is removed completely if a string is provided. If no string is provided by just passingdownload
then the attribute is included as seen in the example in the first issue above. We want to be able to provide a string in order to name the file.Steps to reproduce the behavior:
Create a UI extension with a
Button
component and add the following attributes...href="data:text/csv;charset=UTF-8,title%2Csku%2Ccount%0Atest%2C123456%2C2"}
download="data.csv"
Expected behavior
We expect that the
Button
component would create an HTML component with the expectedhref
anddownload
either with a blob URL...or a data URL.
Thanks for any help you can provide in supporting this functionality!
The text was updated successfully, but these errors were encountered: