question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Passing props to customRowComponent

See original GitHub issue

I looked through the issues and didn’t see anything specifically addressing my need to pass additional props to a customRowComponent. For example, I have application state that needs to be referenced in the render method of a customRowComponent.

A simple example would be that the site could be in one of two modes (live, maintenance). The list of items being rendered in Griddle would render differently depending on the site mode. Right now I can’t see an easy way of getting access to that data in the customRowComponent render method. Obviously I could do some hacky and inefficient stuff to add fields to each row of the results after the data is retrieved from the server, but that’s not pretty at all. Is there any way to do this now?

Is there at least a way to define some specific prop like customRowComponentMetaData that would get passed into each row?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
legomindcommented, Jan 9, 2016

@dlong500 Thanks for this.

1reaction
dlong500commented, Jan 8, 2016

The #302 PR has been merged, but there is not a new release yet so I’m leaving this issue open for reference until then. I supposed the docs probably need to be updated too so it’s probably good to keep this open until that happens as well. I could give it a go at updating the docs at some point soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to pass props to row in react-table - Stack Overflow
In your Table component, you pass on any prop (say, rowProps ) of your choice for rows — <Table columns={columns} data={data} rowProps={row ......
Read more >
Passing Props to Detail row component in KendoReact - Telerik
Is it possible to pass props to the Detail Row Component from the parent grid component?
Read more >
How To Customize React Components with Props
In this tutorial, you'll create custom components by passing props to your component. Props are arguments that you provide to a JSX element....
Read more >
Passing Props to a Component - React Docs
React components use props to communicate with each other. Every parent component can pass some information to its child components by giving them...
Read more >
How to pass custom props to getCellProps() #2687 - GitHub
This function is used to resolve any props needed for this cell. You can use the getCellProps hook to extend its functionality. Custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found