From 77c2366dbed884dfa567089a111f7b5c48de6337 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 3 Oct 2025 10:34:15 -0400 Subject: [PATCH] Apply unsaved changes --- src/apps/dashboard/routes/devices/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/dashboard/routes/devices/index.tsx b/src/apps/dashboard/routes/devices/index.tsx index e2571f582a..65bd54e189 100644 --- a/src/apps/dashboard/routes/devices/index.tsx +++ b/src/apps/dashboard/routes/devices/index.tsx @@ -4,6 +4,7 @@ import Edit from '@mui/icons-material/Edit'; import Box from '@mui/material/Box/Box'; import Button from '@mui/material/Button/Button'; import IconButton from '@mui/material/IconButton'; +import { useTheme } from '@mui/material/styles'; import Tooltip from '@mui/material/Tooltip/Tooltip'; import parseISO from 'date-fns/parseISO'; import { type MRT_ColumnDef, type MRT_Theme, useMaterialReactTable } from 'material-react-table'; @@ -21,8 +22,6 @@ import ConfirmDialog from 'components/ConfirmDialog'; import { useApi } from 'hooks/useApi'; import { type UsersRecords, useUsersDetails } from 'hooks/useUsers'; import globalize from 'lib/globalize'; -import { COLOR_SCHEMES } from 'themes/themes'; -import { useColorScheme, useTheme } from '@mui/material'; const getUserCell = (users: UsersRecords) => function UserCell({ renderedCellValue, row }: DeviceInfoCell) { return ( @@ -43,7 +42,6 @@ export const Component = () => { data?.Items || [] ), [ data ]); const { usersById: users, names: userNames, isLoading: isUsersLoading } = useUsersDetails(); - const { colorScheme } = useColorScheme(); const theme = useTheme(); const [ isDeleteConfirmOpen, setIsDeleteConfirmOpen ] = useState(false); @@ -141,6 +139,8 @@ export const Component = () => { } ], [ UserCell, userNames ]); + // NOTE: We need to provide a custom theme due to a MRT bug causing the initial theme to always be used + // https://github.com/KevinVandy/material-react-table/issues/1429 const mrtTheme = useMemo>(() => ({ baseBackgroundColor: theme.palette.background.paper }), [ theme ]);