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

Storybook has a failing case on master #858

Open
docrinehart opened this issue Jul 3, 2019 · 2 comments
Open

Storybook has a failing case on master #858

docrinehart opened this issue Jul 3, 2019 · 2 comments

Comments

@docrinehart
Copy link

Griddle main > with custom griddle key that doesn't exist

Griddle: Property 'garbage' doesn't exist in row data. Please specify a rowKey that exists in <RowDefinition>
    Error: Griddle: Property 'garbage' doesn't exist in row data. Please specify a rowKey that exists in <RowDefinition>
    at transformData (http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:6810:11)
    at Module.GRIDDLE_INITIALIZED (http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:5509:97)
    at GRIDDLE_INITIALIZED (http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:4216:83)
    at http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:6602:14
    at http://localhost:6006/vendors~main.771f17111d3e896ed4f6.bundle.js:26792:31
    at callReducerWithBeforeAfterPipe (http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:6607:10)
    at reducer (http://localhost:6006/main.771f17111d3e896ed4f6.bundle.js:6617:12)
    at p (<anonymous>:1:36402)
    at v (<anonymous>:1:36684)
    at <anonymous>:1:40069
@lvaldovinos
Copy link

hey @docrinehart, I'm taking a look at this one, I'll try to figure out what the problem is.

@lvaldovinos
Copy link

hey @docrinehart this is the expected functionality as far as I can see, when Griddle is initializing there's a reducer which is setting initial Immutable data object, you can take a look at src/utils/dataUtils.js:

  // Validate that the first item in our data has the custom Griddle key
  if (hasCustomRowId && data.length > 0 && !data[0].hasOwnProperty(renderProperties.rowProperties.rowKey)) {
    throw new Error(`Griddle: Property '${renderProperties.rowProperties.rowKey}' doesn't exist in row data. Please specify a rowKey that exists in <RowDefinition>`);
  }

I also took a look at the 1.13.1 tag, and this story is also failing there. so I think you can close this issue.

cc @ryanlanciaux

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