mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(plugin-data-spreadsheet): CB-419 special null cells displaying
This commit is contained in:
@@ -230,7 +230,7 @@ export class AgGridTableController implements IInitializableController, IDestruc
|
||||
}
|
||||
|
||||
private cloneRows(rows: AgGridRow[]): AgGridRow[] {
|
||||
return rows.map(row => [...row].map(v => (v === null ? '' : v))); // TODO: temporary fix dbeaver-corp/dbeaver-web#663
|
||||
return rows.map(row => [...row]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,14 +291,22 @@ function mapDataToColumns(columns?: IAgGridCol[]): ColDef[] {
|
||||
return params.value.split('').map(v => (v.charCodeAt(0) < 32 ? ' ' : v)).join('');
|
||||
}
|
||||
|
||||
if (params.value === 'null') {
|
||||
return '[null]';
|
||||
}
|
||||
|
||||
return params.value;
|
||||
},
|
||||
cellClass: (params: any) => {
|
||||
const classes: string[] = [];
|
||||
const context: AgGridContext = params.context;
|
||||
if (context.isCellEdited(params.node.rowIndex, params.colDef.colId)) {
|
||||
return 'cell-edited';
|
||||
classes.push('cell-edited');
|
||||
}
|
||||
return '';
|
||||
if (params.value === 'null') {
|
||||
classes.push('cell-null');
|
||||
}
|
||||
return classes.join(' ');
|
||||
},
|
||||
})),
|
||||
];
|
||||
|
||||
@@ -43,6 +43,11 @@
|
||||
background-color: #ff99006b;
|
||||
}
|
||||
|
||||
.cell-null > :global(span) {
|
||||
text-transform: uppercase;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.ag-row.ag-row-hover {
|
||||
background-color: transparent;
|
||||
@include stripes-background($mdc-theme-secondary);
|
||||
|
||||
Reference in New Issue
Block a user