1
0
Fork 0
mirror of synced 2024-08-17 02:51:55 +12:00

Update client table component to be more generic about passing table customisation options

This commit is contained in:
Andrew Kingston 2022-02-18 20:29:20 +00:00
parent 2bc3e96ec7
commit 86acb3fea3

View file

@ -86,11 +86,13 @@
if (UnsortableTypes.includes(schema[columnName].type)) {
newSchema[columnName].sortable = false
}
if (field?.displayName) {
newSchema[columnName].displayName = field?.displayName
}
if (field?.width) {
newSchema[columnName].width = field?.width
// Add additional settings like width etc
if (typeof field === "object") {
newSchema[columnName] = {
...newSchema[columnName],
...field,
}
}
})
return newSchema