Skip to content

Commit d4544e1

Browse files
committed
RELEASE 🚒 : 1.0.2
Ability of specifying the "filename" of the downloaded CSV file . ``` <CSVLink filename={"persons.csv"} data={data}>Click here</CSVLink> ```
1 parent c5053cf commit d4544e1

File tree

9 files changed

+4259
-27
lines changed

9 files changed

+4259
-27
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,16 @@ It renders a hyperlink , and clicking on it will trigger the download action of
126126

127127
It does not accept only `data` and `headers` props , but also , it rendered all props of `HTMLAnchor` tag. (className, target,....)
128128

129+
### - **filename** Props:
130+
`filename` is another props restricted to `CSVLink`. It specifies the filename of the downloaded CSV .
131+
129132
**example**
130133

131134
```js
132135
import {CSVLink} from 'react-csv';
133136

134137
<CSVLink data={data}
138+
filename={"my-file.csv"}
135139
className="btn btn-primary"
136140
target="_blank">
137141
Download me

0 commit comments

Comments
 (0)