Extracting row data outside of Table #3209
Unanswered
efrenmarin45
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to pull the row data from my table and display it to a child Modal component. So essentially, a row of data on my table where the user can click on the row and it would populate on a modal. I am able to use an onClick event to console log the row data on so I know the data is populating in my console. Here is a snippet of my code. To give context, my columns are in a separate file, I also have React-Table-Sticky, and I am running on React-Table v7.6.3.
`export const Table = (props) => {
const {state, dispatch} = useContext(DataContext);
const columns = useMemo(() => GroupedColumns, []);
const data = useMemo(() => state.aircraft.instances, []);
I have been through Stack Overflow and the docs and can't seem to figure this out. Every time I try to call 'row' outside of getRowProps it comes up as undefined. ANY help would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions