mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 03:26:00 +00:00
SYNC: refactor
This commit is contained in:
committed by
Diflow
parent
ff0157e624
commit
a57063adf7
@@ -20,8 +20,8 @@
|
|||||||
$: rowData = firstSelection?.rowData;
|
$: rowData = firstSelection?.rowData;
|
||||||
$: editable = firstSelection?.editable;
|
$: editable = firstSelection?.editable;
|
||||||
$: editorTypes = firstSelection?.editorTypes;
|
$: editorTypes = firstSelection?.editorTypes;
|
||||||
$: columns = selection?.columns || [];
|
$: displayColumns = firstSelection?.displayColumns || [];
|
||||||
$: realColumnUniqueNames = selection?.realColumnUniqueNames || [];
|
$: realColumnUniqueNames = firstSelection?.realColumnUniqueNames || [];
|
||||||
$: setCellValue = selection?.setCellValue;
|
$: setCellValue = selection?.setCellValue;
|
||||||
|
|
||||||
$: uniqueRows = _.uniqBy(selection || [], 'row');
|
$: uniqueRows = _.uniqBy(selection || [], 'row');
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
$: orderedFields = realColumnUniqueNames
|
$: orderedFields = realColumnUniqueNames
|
||||||
.map(colName => {
|
.map(colName => {
|
||||||
const col = columns.find(c => c.uniqueName === colName);
|
const col = displayColumns.find(c => c.uniqueName === colName);
|
||||||
if (!col) return null;
|
if (!col) return null;
|
||||||
const { value, hasMultipleValues } = getFieldValue(colName);
|
const { value, hasMultipleValues } = getFieldValue(colName);
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1248,6 +1248,8 @@
|
|||||||
engine: display?.driver,
|
engine: display?.driver,
|
||||||
editable: grider.editable,
|
editable: grider.editable,
|
||||||
editorTypes: display?.driver?.dataEditorTypesBehaviour,
|
editorTypes: display?.driver?.dataEditorTypesBehaviour,
|
||||||
|
displayColumns: columns,
|
||||||
|
realColumnUniqueNames,
|
||||||
};
|
};
|
||||||
|
|
||||||
const rowIndexes = _.sortBy(_.uniq(regular.map(x => x[0])));
|
const rowIndexes = _.sortBy(_.uniq(regular.map(x => x[0])));
|
||||||
@@ -1286,9 +1288,6 @@
|
|||||||
})
|
})
|
||||||
.filter(x => x.column);
|
.filter(x => x.column);
|
||||||
|
|
||||||
res.columns = columns;
|
|
||||||
res.realColumnUniqueNames = realColumnUniqueNames;
|
|
||||||
|
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
const uniqueRowIndices = _.uniq(res.map(x => x.row));
|
const uniqueRowIndices = _.uniq(res.map(x => x.row));
|
||||||
res.setCellValue = (columnName, value) => {
|
res.setCellValue = (columnName, value) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user