S
S
sharkdest2018-12-18 12:38:12
JavaScript
sharkdest, 2018-12-18 12:38:12

How to call the Save As window?

Hello, the task is as follows:
when you click on the button, a CSV should be generated from the object + this file should be loaded, we managed to implement this:

import { CSVLink } from "react-csv";

<CSVLink
 className="btn btn-secondary btn-download"
 data={rows}
 separator={";"}
 filename={filename}
>
 Download
</CSVLink>

In this case, the file is loaded in such a way that the Save As window is not displayed, but simply downloaded immediately.
How to call the SAVE AS window?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stalker_RED, 2018-12-18
@Stalker_RED

Here is the finished demo. Only here xml and not csv, the first three lines will need to be corrected.

A
Alexander Pushkarev, 2018-12-18
@AXP-dev

You cannot call this window manually. It can only be called by the user. You can make your own implementation of this window, but there you can only enter a name, and the file will be saved to the folder that is specified in the browser for downloads.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question