Skip to content

Commit 0f4656c

Browse files
committed
csv component documentation
1 parent 1e785dd commit 0f4656c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,16 @@ This will generate a table with the stores in the first column, and the items in
794794

795795

796796
INSERT INTO component(name, icon, description) VALUES
797-
('csv', 'download', 'A button that lets the user download data as a CSV file. Each column from the items in the component will map to a column in the resulting CSV.');
797+
('csv', 'download', 'Lets the user download data as a CSV file.
798+
Each column from the items in the component will map to a column in the resulting CSV.
799+
800+
When `csv` is used as a **header component** (without a [shell](?component=shell)), it will trigger a download of the CSV file directly on page load.
801+
If the csv file to download is large, we recommend using this approach.
802+
803+
When used inside a page (after calling the shell component), this will add a button to the page that lets the user download the CSV file.
804+
The button will need to load the entire contents of the CSV file in memory, inside the browser, even if the user does not click on it.
805+
If the csv file to download is large, we recommend using this component without a shell component in order to efficiently stream the data to the browser.
806+
');
798807

799808
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'csv', * FROM (VALUES
800809
-- top level

0 commit comments

Comments
 (0)