react-tabulator
react-tabulator copied to clipboard
React upload data from ajaxURL
<ReactTabulator
options={{
height: '100%',
pagination:'remote',
ajaxURL: 'http://localhost/api/door_api/search',
ajaxConfig:{
method:"POST", //set request type to Position
credentials: 'include',
},
ajaxResponse: (url, params, response) => {
console.log(response.data)
return response.data;
}}}
ref={ref}
columns={columns}
layout="fitColumns"
data={[]}
/>
</Template>
I can see the api get back in the console but from some kind of reason the tabulato doesnt draw the data on the table at all. Running dev tools - the data is not appended to the DOM at all..... what am i doing wrong?
Add: let data
Change: data={[]} to data={data}