I am trying to have date values display in an ag grid table. The date values are displaying in other tables that have a name property in them, but it is not displaying in one table that does not display in this table.
These are my codes below. I tried mapping the response from the data but to no avail
useEffect(() => {
getData();
}, []);
const getData = () => {
axios.get(apiUrl).then(res => {
res?.data.map(n => n.startDate);
setTableData(res.data);
}).catch(error => {
console.warn(error, 'api-error');
});
};
JSX
return(
<div className="ag-theme-alpine" style={{ height: '600px' }}>
<AgGridReact
rowData={tableData}
defaultColDef={defaultColDef}
columnDefs={columnDefs}
onGridReady={onGridReady}
pagination={true}
paginationPageSize={12}
enableBrowserTooltips={true}
></AgGridReact>
</div>
)
