Skip to content
New issue

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

CSV export button #219

Merged
merged 12 commits into from
Oct 18, 2023
Merged

CSV export button #219

merged 12 commits into from
Oct 18, 2023

Conversation

camdendotlol
Copy link
Contributor

@camdendotlol camdendotlol commented Oct 12, 2023

Summary

This PR adds a csvExportButton prop to the List component, with the overall code structure modeled after the existing deleteButton prop. When provided via any parent component (e.g. ListTable, DataTable, and possibly more?), a "CSV Export" button will appear.

When clicked, the button turns the component's props.items array into a CSV string and then downloads it as table.csv. The columns will include all fields in the table regardless of visibility settings.

Demonstration

Screen.Recording.2023-10-12.at.4.34.28.PM.mov

packages/semantic-ui/src/components/List.js Outdated Show resolved Hide resolved
packages/semantic-ui/src/components/List.js Outdated Show resolved Hide resolved
packages/semantic-ui/src/components/ListTable.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@dleadbetter dleadbetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks great.

@camdendotlol camdendotlol merged commit 26115f7 into master Oct 18, 2023
1 check passed
@dleadbetter dleadbetter added the v1.0.23 Issues in v1.0.23 label Oct 19, 2023
@camdendotlol camdendotlol deleted the cm/csv-export-button branch May 21, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.0.23 Issues in v1.0.23
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants