gregnb / gregnb/mui-datatables

useDisplayedRowsOnly caused the data index undefined

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

Description

## Expected Behavior
```
downloadOptions: {
filterOptions: {
useDisplayedRowsOnly: true
}
},
onDownload: (buildHead, buildBody, columns, data) => {
console.log(data)
},
```
Expected result like useDisplayedRowsOnly: false:
0: {index: 0, data: Array(16)}
1: {index: 1, data: Array(16)}

## Current Behavior
undefined in index in current result:
0: {index: undefined, data: Array(16)}
1: {index: undefined, data: Array(16)}

## Steps to Reproduce (for bugs)

1. useDisplayedRowsOnly: true
2. onDownload: (buildHead, buildBody, columns, data)
3. console.log(data)
4.

## Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | ^5.0.6 |
| MUI-datatables | ^4.0.0 |
| React | ^16.14.0 |
| browser | Chrome |
| etc | |

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.