I have a click handler here that is supposed to help me redirect the page upon clicking the item in the list.
Expectations:
onRowClick: (rowIndex) =>this.props.history.push( {pathname: '/tickets', param: rowIndex[0]};
Of course however, the code won't work. rowIndex is the param that I wish to pass into the url.
this is the history as logged in my console:
action: "POP"
block: ƒ block(prompt)
createHref: ƒ createHref(location)
go: ƒ go(n)
goBack: ƒ goBack()
goForward: ƒ goForward()
length: 50
listen: ƒ listen(listener)
location: {pathname: "/tickets", search: "", hash: "#/", state: undefined}
push: ƒ push(path, state)
replace: ƒ replace(path, state)
__proto__: Object
Here is what I have tried:
onRowClick: (rowIndex) =>this.props.history.push({pathname: '/tickets' , id: rowIndex[0]})
however there doesn't seem to have an effect upon clicking