'ag-grid - href download tag being ignored
Not sure if there is something I am doing wrong, or does AG Grid break some HTML5 attributes?
I am using a cellRenderer in two columns and one I am using a standard
<a href="file.png" >imgsrc</a>
while the other one I am using a
<a href="file.png" download>imgsrc</a>
I even tried the newest option
<a download="file.png">imgsrc</a>
and all of them act exactly the same, using the default behavior of just opening the file. I have looked at the rendered page and they are rendering as intended, just not being honored for some reason.
Is this a known issue, or is there a way to work around this?
Solution 1:[1]
I found what my issue was, and it didn't have anything to do with the AG Grid, but the way I was implementing the href tag. I was using a full URL to the download file instead of using a relative one. This was the way my JSON file was coming in, with the full URL instead of relative. I changed it to a relative path for all the file links and the behavior is now as expected.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | divtag |
