mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 09:45:59 +00:00
column manager select ux improved
This commit is contained in:
@@ -54,9 +54,17 @@ 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 onMouseEnter={() => setIsHover(true)} onMouseLeave={() => setIsHover(false)}>
|
<Row
|
||||||
|
onMouseEnter={() => setIsHover(true)}
|
||||||
|
onMouseLeave={() => setIsHover(false)}
|
||||||
|
onClick={(e) => {
|
||||||
|
// @ts-ignore
|
||||||
|
if (e.target.closest('.expandColumnIcon')) return;
|
||||||
|
display.focusColumn(column.uniqueName);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ExpandIcon
|
<ExpandIcon
|
||||||
// className="expandColumnIcon"
|
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}
|
||||||
@@ -68,11 +76,7 @@ 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
|
<ColumnLabel {...column} />
|
||||||
{...column}
|
|
||||||
// @ts-ignore
|
|
||||||
onClick={() => display.focusColumn(column.uniqueName)}
|
|
||||||
/>
|
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user