Update client table component to be more generic about passing table customisation options
This commit is contained in:
parent
e63dcd86e9
commit
34cdf90b67
|
@ -86,11 +86,13 @@
|
|||
if (UnsortableTypes.includes(schema[columnName].type)) {
|
||||
newSchema[columnName].sortable = false
|
||||
}
|
||||
if (field?.displayName) {
|
||||
newSchema[columnName].displayName = field?.displayName
|
||||
|
||||
// Add additional settings like width etc
|
||||
if (typeof field === "object") {
|
||||
newSchema[columnName] = {
|
||||
...newSchema[columnName],
|
||||
...field,
|
||||
}
|
||||
if (field?.width) {
|
||||
newSchema[columnName].width = field?.width
|
||||
}
|
||||
})
|
||||
return newSchema
|
||||
|
|
Loading…
Reference in New Issue