Answer the question
In order to leave comments, you need to log in
How to add an additional column to the table if the data comes as an object?
I am using the material ui component
<DataGrid className={styles.table} columns={columns} rows={rows} getRowId={row => row.tradePlace_id} />
const rows: GridRowsProp = tradePlaces.tradePlaces;
const columns: GridColDef[] = [
{field: 'col1', headerName: 'Изменить', width: 500}, // Здесь должна быть кнопка
{field: 'tradePlace_id', headerName: '№', width: 300},
{field: 'name', headerName: 'Название', width: 300},
{field: 'adress', headerName: 'Адрес', width: 300},
];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question