gregnb / gregnb/mui-datatables

Invoke "download to csv" function when clicking on a custom icon in customToolbarSelect

Open
#1,260 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

I'm building a data table with your widget, and I'd like to make the user download to csv only the currently selected records, without have to replicate all the code needed to transform data in to CSV and implementing the "onDownload" callback, filtering out not selected rows.

## Expected Behavior
I was expecting some sort of hook or function to invoke, within CustomToolbarSelect callback

## Current Behavior
It seems impossible (by looking at documentation and sourcecode) to invoke the "download to csv" function (handleCSVDownload) when clicking over a custom icon/button put inside the CustomToolbarSelect

## Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | 4.9.10 |
| MUI-datatables | 2.14.0 |
| React | 16.13.1 |
| browser | Firefox |
| etc | |

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names CustomToolbarSelect and handleCSVDownload as the relevant entry points; start by tracing how the custom toolbar callback relates to the existing CSV download behavior. No file or test is identified, so completion should be defined as a documented way to trigger CSV download for only the selected records without reimplementing CSV conversion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.