Skip to content

[feature] Added nested object key access for data and column match#165

Open
mehmetyilmaz001 wants to merge 1 commit intosecuredeveloper:masterfrom
mehmetyilmaz001:nested_object_key_support
Open

[feature] Added nested object key access for data and column match#165
mehmetyilmaz001 wants to merge 1 commit intosecuredeveloper:masterfrom
mehmetyilmaz001:nested_object_key_support

Conversation

@mehmetyilmaz001
Copy link

The following has been addressed in the PR:

Description:

[feature]

Accessing nested object is available with this PR

In the value prop of ExcelColumn, you can now provide nested object path like "user.name" as in the example

const dataSet = [
  {
     user: {name: 'Mehmet', surname: 'Yılmaz'},
     period: 'Eylül - Ekim'
  },

  {
     user: {name: 'Semih', surname: 'Yavuz'},
     period: 'Haziran - Temmuz'
  }
]


class Download extends React.Component {
    render() {
        return (
            <ExcelFile>
                <ExcelSheet data={dataSet} name="Employees">
                    <ExcelColumn label="Name" value="user.name"/>
                    <ExcelColumn label="Period" value="period"/>
                </ExcelSheet>
            </ExcelFile>
        );
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant