From 0f4656c19ddc9ba19d6f7fa8dee2478a38b0ab16 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Sat, 26 Oct 2024 00:31:35 +0300 Subject: [PATCH] csv component documentation --- .../sqlpage/migrations/01_documentation.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql index 38eb3c5b..f031d875 100644 --- a/examples/official-site/sqlpage/migrations/01_documentation.sql +++ b/examples/official-site/sqlpage/migrations/01_documentation.sql @@ -794,7 +794,16 @@ This will generate a table with the stores in the first column, and the items in INSERT INTO component(name, icon, description) VALUES - ('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.'); + ('csv', 'download', '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. + +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. +If the csv file to download is large, we recommend using this approach. + +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. +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. +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. +'); INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'csv', * FROM (VALUES -- top level