Skip to content

Commit

Permalink
dashboard edit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Aug 2, 2024
1 parent 5e98ba5 commit 4b9d233
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions app/packages/core/src/plugins/SchemaIO/components/DashboardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,32 +198,34 @@ export default function DashboardView(props: ViewPropsType) {
>
<DragHandle className="drag-handle">
<Typography>{property.title || id}</Typography>
{allow_edit && (
<IconButton
size="small"
onMouseDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
onEditItem({ id, path: getPath(path, id) });
}}
sx={{ color: theme.text.secondary }}
>
<Edit />
</IconButton>
)}
{allow_deletion && (
<IconButton
size="small"
onMouseDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
onCloseItem({ id, path: getPath(path, id) });
}}
sx={{ color: theme.text.secondary }}
>
<CloseIcon />
</IconButton>
)}
<Box>
{allow_edit && (
<IconButton
size="small"
onMouseDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
onEditItem({ id, path: getPath(path, id) });
}}
sx={{ color: theme.text.secondary }}
>
<Edit />
</IconButton>
)}
{allow_deletion && (
<IconButton
size="small"
onMouseDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
onCloseItem({ id, path: getPath(path, id) });
}}
sx={{ color: theme.text.secondary }}
>
<CloseIcon />
</IconButton>
)}
</Box>
</DragHandle>
<Box sx={{ height: "calc(100% - 35px)", overflow: "auto" }}>
<DynamicIO
Expand Down

0 comments on commit 4b9d233

Please sign in to comment.