Skip to content

useDisplayedRowsOnly caused the data index undefined #1815

@auntieyi

Description

@auntieyi

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)

Your Environment

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions