From 96bf33a76d52a9b28de22fddc7d70aeb435a0005 Mon Sep 17 00:00:00 2001 From: Luis-Hebendanz Date: Tue, 15 Aug 2023 20:37:34 +0200 Subject: [PATCH] Fixed jumping icon on selected --- pkgs/ui/src/app/nodes/NodeList.tsx | 34 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/ui/src/app/nodes/NodeList.tsx b/pkgs/ui/src/app/nodes/NodeList.tsx index 496277f64..f53d3757a 100644 --- a/pkgs/ui/src/app/nodes/NodeList.tsx +++ b/pkgs/ui/src/app/nodes/NodeList.tsx @@ -119,7 +119,7 @@ function stableSort( return stabilizedThis.map((el) => el[0]); } -function CrudSpeedDial(props: {selected: string | undefined}) { +function CrudSpeedDial(props: { selected: string | undefined }) { const { selected } = props; const [open, setOpen] = React.useState(false); @@ -135,7 +135,19 @@ function CrudSpeedDial(props: {selected: string | undefined}) { } } - const isSomethingSelected = selected != undefined; + const isSomethingSelected = selected != undefined; + + function editDial() { + if (isSomethingSelected) { + return ( + + + + ); + } else { + return ; + } + } return ( + } @@ -170,18 +182,12 @@ function CrudSpeedDial(props: {selected: string | undefined}) { } + icon={ + + } tooltipTitle="Delete" /> - - - - } - tooltipTitle="Edit" - /> + ); @@ -289,7 +295,7 @@ function EnhancedTableToolbar(props: EnhancedTableToolbarProps) { return ( - +