I am trying to build a table of permissions with react-table.
After working on my data, I have this type of arrray (this is purely an exemple and for each Administrator/Editor/Reader I have other data) :
[
{ Description: 'Create', Administrator: {id: 99, value: 1}, Editor: {id: 98, value: 1}, Reader: {id: 99, value: 0} },
{ Description: 'Delete', Administrator: {id: 99, value: 1}, Editor: {id: 98, value: 0}, Reader: {id: 99, value: 0} },
{ Description: 'Read', Administrator: {id: 99, value: 1}, Editor: {id: 98, value: 1}, Reader: {id: 99, value: 1} },
]
I would like my Column to be Description/Administrator/Editor/Reader.
And for each row (that will correspond to a specific description), I would like to set for exemple a button/checkbox for the column Administrator/Editor/Reader set to their value (1/0) and if the person click/uncheck the button/checkbox in the cell Administrator for the Description 'Read' then I will access the id and change its value in my database.
I uploaded a photo of how I see it.
Is this possible with react table because I can't seem to find any information on how to "assign" multiple data to a cell or should I develop this with another method.
Thank you in advance for any help.