react-tabulator
react-tabulator copied to clipboard
Question: rowClick throws error in react functional component
Environment Details: "react": "^18.1.0", "react-dom": "^18.1.0", "react-tabulator": "^0.18.1",
Issue Description: While clicking on a row apart from getting the required information I'm getting an error. Here it is:
//error
Uncaught TypeError: component.getComponent is not a function
at Interaction.dispatchEvent (Interaction.js:293:1)
at Interaction.handle (Interaction.js:239:1)
at InternalEventBus.js:130:1
at Array.forEach (
//required information //PointerEvent {isTrusted: true, pointerId: 1, width: 1, height: 1, pressure: 0, …} //{title: 'some title', assignees: Array(1), description: '', milestone: 'some milestone', labels: Array(1), …}
Question: How can I fix it or simply not to get that error ?
Code: const Component = () => { //some constants here
const { loading } = useQuery(MY_QUERY { onCompleted: (data) => { //some code here }, onError: (err) => { //some code here }, }
const rowClickHandler = (e, row) => { console.log(e, row.getData()); }
return ( //some checking to display the error component or the loader <> //other components
<ReactTabulator
data={data}
columns={columns}
events={{ rowClick: rowClickHandler }}
/>
</>
)
}
Having the same issue, any ideas how to fix it?
Same issue here
Same issue here, any workaround yet?
I guess a solution was never found for this?