From 5d792a594561829997d8ebc258b2179cc77cea22 Mon Sep 17 00:00:00 2001 From: Massimo Melina Date: Fri, 19 Jul 2024 15:56:39 +0200 Subject: [PATCH] fix: (regression beta) admin/plugins: misplaced theme icon --- admin/src/DataTable.ts | 8 ++++---- admin/src/InstalledPlugins.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/admin/src/DataTable.ts b/admin/src/DataTable.ts index a944725da..8a04887ee 100644 --- a/admin/src/DataTable.ts +++ b/admin/src/DataTable.ts @@ -16,6 +16,7 @@ export type DataTableColumn = GridColDef & { dialogHidden?: boolean sx?: SxProps mergeRender?: { [other: string]: false | { override?: Partial> } & BoxProps } + mergeRenderSx?: SxProps } interface DataTableProps extends Omit, 'columns'> { columns: Array> @@ -63,12 +64,11 @@ export function DataTable({ columns, initialState={}, actions, actionsProps, ini const { columns } = params.api.store.getSnapshot() return h(Box, { maxHeight: '100%', sx: { textWrap: 'wrap', ...sx } }, // wrap if necessary, but stay within the row col.renderCell ? col.renderCell(params) : params.formattedValue, - h(Flex, { fontSize: 'smaller', flexWrap: 'wrap', mt: '2px' }, // wrap, normally causing overflow/hiding, if it doesn't fit + h(Flex, { fontSize: 'smaller', flexWrap: 'wrap', mt: '2px', ...col.mergeRenderSx }, // wrap, normally causing overflow/hiding, if it doesn't fit ...onlyTruthy(_.map(col.mergeRender, (props, other) => { if (!props || columns.columnVisibilityModel[other] !== false) return null - const { override, ...rest } = props - const rendered = renderCell({ ...columns.lookup[other], ...override }, params.row) - return rendered && h(Box, { ...rest, ...compact && { lineHeight: '1em' } }, rendered) + const rendered = renderCell({ ...columns.lookup[other], ...props.override }, params.row) + return rendered && h(Box, { ...props, ...{ override: undefined }, ...compact && { lineHeight: '1em' } }, rendered) })) ) ) diff --git a/admin/src/InstalledPlugins.ts b/admin/src/InstalledPlugins.ts index 45cca986e..a5fb649be 100644 --- a/admin/src/InstalledPlugins.ts +++ b/admin/src/InstalledPlugins.ts @@ -202,7 +202,8 @@ function UsernameField({ value, onChange, multiple, ...rest }: FieldProps