mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 00:36:01 +00:00
added column fix
This commit is contained in:
@@ -5,11 +5,11 @@ export interface GridConfigColumns {
|
|||||||
hiddenColumns: string[];
|
hiddenColumns: string[];
|
||||||
expandedColumns: string[];
|
expandedColumns: string[];
|
||||||
addedColumns: string[];
|
addedColumns: string[];
|
||||||
focusedColumn?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GridConfig extends GridConfigColumns {
|
export interface GridConfig extends GridConfigColumns {
|
||||||
filters: { [uniqueName: string]: string };
|
filters: { [uniqueName: string]: string };
|
||||||
|
focusedColumn?: string;
|
||||||
sort: {
|
sort: {
|
||||||
uniqueName: string;
|
uniqueName: string;
|
||||||
order: 'ASC' | 'DESC';
|
order: 'ASC' | 'DESC';
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export abstract class GridDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get allColumns() {
|
get allColumns() {
|
||||||
return this.columns;
|
return this.getColumns(null).filter((col) => col.isChecked || col.uniquePath.length == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
|
|||||||
@@ -54,12 +54,9 @@ function ColumnManagerRow(props) {
|
|||||||
const { display, column } = props;
|
const { display, column } = props;
|
||||||
const [isHover, setIsHover] = React.useState(false);
|
const [isHover, setIsHover] = React.useState(false);
|
||||||
return (
|
return (
|
||||||
<Row
|
<Row onMouseEnter={() => setIsHover(true)} onMouseLeave={() => setIsHover(false)}>
|
||||||
onMouseEnter={() => setIsHover(true)}
|
|
||||||
onMouseLeave={() => setIsHover(false)}
|
|
||||||
onClick={() => display.focusColumn(column.uniqueName)}
|
|
||||||
>
|
|
||||||
<ExpandIcon
|
<ExpandIcon
|
||||||
|
// className="expandColumnIcon"
|
||||||
isBlank={!column.foreignKey}
|
isBlank={!column.foreignKey}
|
||||||
isExpanded={column.foreignKey && display.isExpandedColumn(column.uniqueName)}
|
isExpanded={column.foreignKey && display.isExpandedColumn(column.uniqueName)}
|
||||||
isSelected={isHover}
|
isSelected={isHover}
|
||||||
@@ -71,7 +68,11 @@ function ColumnManagerRow(props) {
|
|||||||
checked={column.isChecked}
|
checked={column.isChecked}
|
||||||
onChange={() => display.setColumnVisibility(column.uniquePath, !column.isChecked)}
|
onChange={() => display.setColumnVisibility(column.uniquePath, !column.isChecked)}
|
||||||
></input>
|
></input>
|
||||||
<ColumnLabel {...column} />
|
<ColumnLabel
|
||||||
|
{...column}
|
||||||
|
// @ts-ignore
|
||||||
|
onClick={() => display.focusColumn(column.uniqueName)}
|
||||||
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ export class SeriesSizes {
|
|||||||
this.scrollItems = [];
|
this.scrollItems = [];
|
||||||
this.scrollIndexes = _.filter(
|
this.scrollIndexes = _.filter(
|
||||||
_.map(_.range(this.count), (x) => this.modelToReal(x) - this.frozenCount),
|
_.map(_.range(this.count), (x) => this.modelToReal(x) - this.frozenCount),
|
||||||
|
// _.map(this.intKeys(_.keys(this.sizeOverridesByModelIndex)), (x) => this.modelToReal(x) - this.frozenCount),
|
||||||
(x) => x >= 0
|
(x) => x >= 0
|
||||||
);
|
);
|
||||||
this.scrollIndexes.sort();
|
this.scrollIndexes.sort();
|
||||||
|
|||||||
Reference in New Issue
Block a user