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

Changing state results does not update the table. #49

Closed
appsciences opened this issue Jan 19, 2015 · 2 comments
Closed

Changing state results does not update the table. #49

appsciences opened this issue Jan 19, 2015 · 2 comments

Comments

@appsciences
Copy link

Storing results in state and then changing state doesn't seem to update the table, as in:

var TestTable = React.createClass({...
getInitialState: function() {
    return {
        test: [{name:"foo"}]
    };
},

test: function(event) {
    this.setState(
        {test: [{name:"bar"}]}
    );
},

render: function() {
    return (
    <Griddle
        results={this.state.test}
    />
    <button onChange="this.test">
)})}
@ryanlanciaux
Copy link
Member

Hi there! We just updated Griddle to ver 0.2.0 and this behavior should be a bit easier now. If the end result is you'd like to wrap up an API call or something along those lines, please check out the External Data section on the updated documentation and let me know if it's still causing problems.

@ryanlanciaux
Copy link
Member

Just checking in -- were you able to figure this out? I've tossed an example of this scenario in jsfiddle (mostly using the code you provided). I'm closing this out for now but please let me know if you have any trouble! 👍

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

No branches or pull requests

2 participants