Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggling visibility in Settings removes the value from rowData #57

Closed
lostman opened this issue Jan 22, 2015 · 1 comment
Closed

Toggling visibility in Settings removes the value from rowData #57

lostman opened this issue Jan 22, 2015 · 1 comment
Labels

Comments

@lostman
Copy link

lostman commented Jan 22, 2015

Small example:

React.render(
    React.createElement(Griddle,
        {showSettings: true
        , columnMetadata: [
                {columnName: "foo"
                , "visible": true
                , customComponent: React.createClass({
                        render: function() {
                                return React.createElement("div", null, "foo: ", this.props.data, " bar: ", this.props.rowData.bar);
                        }})}
                , {columnName: "bar"
                , "visible": true}]
        , results: [{foo: "foo", bar: "bar"}]})
        , document.body)

Column foo contains the value foo: foo bar: bar. Now go to Settings and hide bar. Back in foo we see foo: foo bar:. That is, the value this.props.rowData.bar is no longer available.

The first thing I tried with Griddle was displaying objects where to fields in the object combine into one display cell. Hence I found this.

@ryanlanciaux
Copy link
Member

Thanks for reporting and for including an example! I think we'll have to do something to pass the hidden columns through to custom components as well.

We are hoping to have a version 0.2.1 out within the next week, which should contain a fix.

Edit: I spoke too soon on 0.2.1 but we still are hoping to get a fix out in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants