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