Skip to content

TypeError: r.props.data[0].map is not a function #108

@mitchhankins01

Description

@mitchhankins01

Hi,

I'm getting this error when trying to pass in an array of objects in to Pivot, according to the docs this should be possible; and when I pass in an array of arrays Pivot works just fine.

Sample data causing issues:

const data = [

{ name: 'Some Name', age: 'Some Age' },

{ name: 'Some Name', age: 'Some Age' },

{ name: 'Some Name', age: 'Some Age' },

{ name: 'Some Name', age: 'Some Age' },

{ name: 'Some Name', age: 'Some Age' }

];

<Pivot data={data} />

Any help would be greatly appreciated, thanks!

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