mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 09:45:59 +00:00
fix
This commit is contained in:
@@ -22,13 +22,14 @@ export class FreeTableGridDisplay extends GridDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getDisplayColumns(model: FreeTableModel) {
|
getDisplayColumns(model: FreeTableModel) {
|
||||||
return (
|
return _.uniqBy(
|
||||||
model?.structure?.columns
|
model?.structure?.columns
|
||||||
?.map(col => this.getDisplayColumn(col))
|
?.map(col => this.getDisplayColumn(col))
|
||||||
?.map(col => ({
|
?.map(col => ({
|
||||||
...col,
|
...col,
|
||||||
isChecked: this.isColumnChecked(col),
|
isChecked: this.isColumnChecked(col),
|
||||||
})) || []
|
})) || [],
|
||||||
|
col => col.uniqueName
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import _ from 'lodash';
|
||||||
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay';
|
||||||
import { QueryResultColumn } from 'dbgate-types';
|
import { QueryResultColumn } from 'dbgate-types';
|
||||||
import { GridConfig, GridCache } from './GridConfig';
|
import { GridConfig, GridCache } from './GridConfig';
|
||||||
@@ -18,7 +19,8 @@ export class JslGridDisplay extends GridDisplay {
|
|||||||
this.filterable = true;
|
this.filterable = true;
|
||||||
|
|
||||||
if (structure.columns) {
|
if (structure.columns) {
|
||||||
this.columns = structure.columns
|
this.columns = _.uniqBy(
|
||||||
|
structure.columns
|
||||||
.map(col => ({
|
.map(col => ({
|
||||||
columnName: col.columnName,
|
columnName: col.columnName,
|
||||||
headerText: col.columnName,
|
headerText: col.columnName,
|
||||||
@@ -32,7 +34,9 @@ export class JslGridDisplay extends GridDisplay {
|
|||||||
?.map(col => ({
|
?.map(col => ({
|
||||||
...col,
|
...col,
|
||||||
isChecked: this.isColumnChecked(col),
|
isChecked: this.isColumnChecked(col),
|
||||||
}));
|
})),
|
||||||
|
col => col.uniqueName
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (structure.__isDynamicStructure) {
|
if (structure.__isDynamicStructure) {
|
||||||
|
|||||||
@@ -80,7 +80,8 @@
|
|||||||
|
|
||||||
export let isDetailView = false;
|
export let isDetailView = false;
|
||||||
export let showReferences = false;
|
export let showReferences = false;
|
||||||
export let showMacros;
|
export let showMacros = false;
|
||||||
|
export let expandMacros = false;
|
||||||
export let freeTableColumn = false;
|
export let freeTableColumn = false;
|
||||||
export let isDynamicStructure = false;
|
export let isDynamicStructure = false;
|
||||||
export let macroCondition;
|
export let macroCondition;
|
||||||
@@ -188,7 +189,7 @@
|
|||||||
<ReferenceManager {...$$props} {managerSize} />
|
<ReferenceManager {...$$props} {managerSize} />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
|
|
||||||
<WidgetColumnBarItem title="Macros" name="macros" skip={!showMacros} collapsed>
|
<WidgetColumnBarItem title="Macros" name="macros" skip={!showMacros} collapsed={!expandMacros}>
|
||||||
<MacroManager {...$$props} {managerSize} />
|
<MacroManager {...$$props} {managerSize} />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
</WidgetColumnBar>
|
</WidgetColumnBar>
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
gridCoreComponent={FreeTableGridCore}
|
gridCoreComponent={FreeTableGridCore}
|
||||||
freeTableColumn
|
freeTableColumn
|
||||||
showMacros
|
showMacros
|
||||||
|
expandMacros
|
||||||
onRunMacro={handleRunMacro}
|
onRunMacro={handleRunMacro}
|
||||||
isDynamicStructure={$modelState.value?.structure?.__isDynamicStructure}
|
isDynamicStructure={$modelState.value?.structure?.__isDynamicStructure}
|
||||||
{display}
|
{display}
|
||||||
|
|||||||
Reference in New Issue
Block a user