We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As a user of the component, I would like to be able to download the data as a CSV.
Would it be as simple as changing the following from:
svelte-ag-grid/src/Component.svelte
Line 25 in 9d19c4c
to:
export let api;
Or, is there a better solution?
The text was updated successfully, but these errors were encountered:
Implementing #9 might be a better option for this issue, as it would allow the consumer to write something like this to access the APIs.
<script> import AgGrid from "@budibase/svelte-ag-grid"; let data = [ { make: "Toyota", model: "Celica", price: 35000 }, { make: "Ford", model: "Mondeo", price: 32000 }, { make: "Porsche", model: "Boxter", price: 72000 }, ]; let columnDefs = [ { headerName: "Make", field: "make", sortable: true, editable: true, }, { headerName: "Model", field: "model", sortable: true }, { headerName: "Price", field: "price", sortable: true }, ]; let api; let options = { onGridReady: (params) => { api = params.api; } } function download () { if (api) { api.exportDataAsCsv({ fileName: 'downloadFileName.csv', columnGroups: true }); } } </script> <style> :global(:root) { --grid-height: 500px; } </style> <AgGrid bind:data {columnDefs} {options} /> <button on:click|preventDefault={download}>Download Data</button>
Sorry, something went wrong.
No branches or pull requests
As a user of the component, I would like to be able to download the data as a CSV.
Would it be as simple as changing the following from:
svelte-ag-grid/src/Component.svelte
Line 25 in 9d19c4c
to:
Or, is there a better solution?
The text was updated successfully, but these errors were encountered: