Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d60a057
Update dependency
johnnyomair Mar 11, 2026
4db0676
Run codemods
johnnyomair Mar 11, 2026
42fdc7e
Fix lint errors
johnnyomair Mar 11, 2026
00745c1
Use Toolbar as root for DataGridToolbar
johnnyomair Mar 11, 2026
b982e4b
Remove root background color to fix invisible text
johnnyomair Mar 16, 2026
ab1c908
Fix closing the panel on click away
johnnyomair Mar 16, 2026
15a0828
Fix paper styles not being applied
johnnyomair Mar 16, 2026
5be496a
Fix Desktop filter styling
johnnyomair Mar 16, 2026
ae45d31
Fix Mobile filter styling
johnnyomair Mar 16, 2026
11d9338
Fix gap between footer buttons in columns management panel
johnnyomair Mar 16, 2026
0c4263d
Fix panel placement
johnnyomair Mar 16, 2026
5d3e052
Use nth-of-type to fix error regarding server-side rendering
johnnyomair Mar 16, 2026
fa075f4
Add GridToolbarQuickFilter component to support a persistent quick fi…
johnnyomair Mar 16, 2026
b9d2bc3
Readd baseTextField slot override to fix manufacturer filter
johnnyomair Mar 16, 2026
38d087c
Fix DataGridToolbar story
johnnyomair Mar 17, 2026
1998c0d
Disable row selection exclude model
johnnyomair Mar 17, 2026
52d4c17
Fix assigning contacts to target groups
johnnyomair Mar 17, 2026
fa6ac17
Fix content scopes selection
johnnyomair Mar 17, 2026
c286388
Fix DataGridToolbar height
johnnyomair Mar 17, 2026
25d7d6c
Add changeset and migration guide
johnnyomair Mar 17, 2026
eb58d27
Merge branch 'main' into upgrade-mui-x-data-grid
johnnyomair Mar 19, 2026
305e4ea
Fix lint errors in TableBlockGrid
johnnyomair Mar 19, 2026
71912e3
Update to latest version
johnnyomair Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/great-pants-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@comet/admin-generator": major
"@comet/admin": major
"@comet/brevo-admin": major
"@comet/cms-admin": major
"@comet/eslint-config": major
---

Bump MUI X Data Grid peer dependency to v8

See the migration guide for information on how to upgrade.
4 changes: 2 additions & 2 deletions demo/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"@fontsource-variable/roboto-flex": "^5.2.8",
"@mui/material": "^7.3.7",
"@mui/system": "^7.3.7",
"@mui/x-data-grid": "^7.29.12",
"@mui/x-data-grid-pro": "^7.29.12",
"@mui/x-data-grid": "^8.27.5",
"@mui/x-data-grid-pro": "^8.27.5",
"@mui/x-date-pickers": "^7.29.4",
"@mui/x-license": "^7.29.1",
"change-case": "^5.4.4",
Expand Down
5 changes: 3 additions & 2 deletions demo/admin/src/news/blocks/NewsListBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ export const NewsListBlock: BlockInterface<NewsListBlockData, State, NewsListBlo
loading={loading}
checkboxSelection
keepNonExistentRowsSelected
rowSelectionModel={state.ids}
rowSelectionModel={{ type: "include", ids: new Set(state.ids) }}
onRowSelectionModelChange={(newSelection) => {
updateState({ ids: newSelection as string[] });
updateState({ ids: Array.from(newSelection.ids) as string[] });
}}
disableRowSelectionExcludeModel
/>
</Box>
);
Expand Down
3 changes: 2 additions & 1 deletion demo/admin/src/news/generated/NewsGrid.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions demo/admin/src/products/ManufacturerFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql, useQuery } from "@apollo/client";
import { ClearInputAdornment } from "@comet/admin";
import Autocomplete from "@mui/material/Autocomplete";
import { type GridFilterInputValueProps, type GridFilterOperator, useGridRootProps } from "@mui/x-data-grid-pro";
import { useCallback, useState } from "react";
import { type ChangeEvent, useCallback, useState } from "react";
import { useIntl } from "react-intl";
import { useDebounce } from "use-debounce";

Expand Down Expand Up @@ -72,8 +72,8 @@ function ManufacturerFilter({ item, applyValue, apiRef }: GridFilterInputValuePr
<rootProps.slots.baseTextField
{...params}
placeholder={intl.formatMessage({ id: "manufacturer-filter.placeholder", defaultMessage: "Choose a manufacturer" })}
value={search ? search : null}
onChange={(event) => {
value={search}
onChange={(event: ChangeEvent<HTMLInputElement>) => {
setSearch(event.target.value);
}}
label={apiRef.current.getLocaleText("filterPanelInputLabel")}
Expand Down
4 changes: 3 additions & 1 deletion demo/admin/src/products/ManufacturersGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
FillSpace,
type GridColDef,
GridFilterButton,
GridToolbarQuickFilter,
muiGridFilterToGql,
muiGridSortToGql,
StackLink,
Expand All @@ -17,7 +18,7 @@ import {
} from "@comet/admin";
import { Add as AddIcon, Edit, Info } from "@comet/admin-icons";
import { IconButton } from "@mui/material";
import { DataGridPro, GridColumnHeaderTitle, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { DataGridPro, GridColumnHeaderTitle } from "@mui/x-data-grid-pro";
import {
type GQLDeleteManufacturerMutation,
type GQLDeleteManufacturerMutationVariables,
Expand Down Expand Up @@ -161,6 +162,7 @@ export function ManufacturersGrid() {
slots={{
toolbar: ManufacturersGridToolbar,
}}
showToolbar
/>
);
}
Expand Down
6 changes: 3 additions & 3 deletions demo/admin/src/products/ProductCategoryFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { gql, useQuery } from "@apollo/client";
import { ClearInputAdornment } from "@comet/admin";
import Autocomplete from "@mui/material/Autocomplete";
import { type GridFilterInputValueProps, type GridFilterOperator, useGridRootProps } from "@mui/x-data-grid-pro";
import { useCallback, useState } from "react";
import { type ChangeEvent, useCallback, useState } from "react";
import { useIntl } from "react-intl";
import { useDebounce } from "use-debounce";

Expand Down Expand Up @@ -73,8 +73,8 @@ function ProductCategoryFilter({ item, applyValue, apiRef }: GridFilterInputValu
{...params}
autoComplete="off"
placeholder={intl.formatMessage({ id: "productCategory.placeholder", defaultMessage: "Choose a Product Category" })}
value={search ? search : null}
onChange={(event) => {
value={search}
onChange={(event: ChangeEvent<HTMLInputElement>) => {
setSearch(event.target.value);
}}
label={apiRef.current.getLocaleText("filterPanelInputLabel")}
Expand Down
4 changes: 3 additions & 1 deletion demo/admin/src/products/ProductVariantsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
FillSpace,
type GridColDef,
GridFilterButton,
GridToolbarQuickFilter,
muiGridFilterToGql,
muiGridSortToGql,
StackLink,
Expand All @@ -14,7 +15,7 @@ import {
} from "@comet/admin";
import { Add as AddIcon, Edit } from "@comet/admin-icons";
import { IconButton } from "@mui/material";
import { DataGridPro, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { DataGridPro } from "@mui/x-data-grid-pro";
import { FormattedMessage } from "react-intl";

import {
Expand Down Expand Up @@ -124,6 +125,7 @@ export function ProductVariantsGrid({ productId }: { productId: string }) {
slots={{
toolbar: ProductVariantsGridToolbar,
}}
showToolbar
/>
);
}
Expand Down
15 changes: 10 additions & 5 deletions demo/admin/src/products/ProductsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
type GridColDef,
GridColumnsButton,
GridFilterButton,
GridToolbarQuickFilter,
messages,
muiGridFilterToGql,
muiGridSortToGql,
Expand All @@ -32,7 +33,6 @@ import {
GridFilterInputSingleSelect,
type GridRowSelectionModel,
type GridSlotsComponent,
GridToolbarQuickFilter,
} from "@mui/x-data-grid-pro";
import { ProductCategoryFilterOperators } from "@src/products/ProductCategoryFilter";
import { useMemo, useState } from "react";
Expand Down Expand Up @@ -81,7 +81,7 @@ function ProductsGridToolbar({ exportApi, selectionModel }: ProductsGridToolbarP
label: "Publish",
icon: <Online htmlColor={theme.palette.success.main} />,
onClick: () => {
for (const id of selectionModel) {
for (const id of Array.from(selectionModel.ids)) {
client.mutate<GQLUpdateProductStatusMutation, GQLUpdateProductStatusMutationVariables>({
mutation: updateProductStatusMutation,
variables: { id: id as string, status: "Published" },
Expand All @@ -97,7 +97,7 @@ function ProductsGridToolbar({ exportApi, selectionModel }: ProductsGridToolbarP
label: "Unpublish",
icon: <Disabled />,
onClick: () => {
for (const id of selectionModel) {
for (const id of Array.from(selectionModel.ids)) {
client.mutate<GQLUpdateProductStatusMutation, GQLUpdateProductStatusMutationVariables>({
mutation: updateProductStatusMutation,
variables: { id: id as string, status: "Unpublished" },
Expand All @@ -110,7 +110,7 @@ function ProductsGridToolbar({ exportApi, selectionModel }: ProductsGridToolbarP
},
},
]}
selectionSize={selectionModel.length}
selectionSize={selectionModel.ids.size}
/>
<Button responsive startIcon={<AddIcon />} component={StackLink} pageName="add" payload="add">
<FormattedMessage id="products.newProduct" defaultMessage="New Product" />
Expand All @@ -125,7 +125,10 @@ export function ProductsGrid() {
const client = useApolloClient();
const intl = useIntl();
const theme = useTheme();
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>([]);
const [selectionModel, setSelectionModel] = useState<GridRowSelectionModel>({
type: "include",
ids: new Set([]),
});

const columns = useMemo((): GridColDef<GQLProductsListManualFragment>[] => {
return [
Expand Down Expand Up @@ -389,6 +392,8 @@ export function ProductsGrid() {
onRowSelectionModelChange={(selectionModel) => {
setSelectionModel(selectionModel);
}}
disableRowSelectionExcludeModel
showToolbar
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export function ProductCategoriesGrid() {
rowReordering
onRowOrderChange={handleRowOrderChange}
hideFooterPagination
showToolbar
/>
);
}
7 changes: 3 additions & 4 deletions demo/admin/src/products/generator/ManufacturerFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ClearInputAdornment } from "@comet/admin";
import { ChevronDown } from "@comet/admin-icons";
import Autocomplete from "@mui/material/Autocomplete";
import { type GridFilterInputValueProps, type GridFilterOperator, useGridRootProps } from "@mui/x-data-grid-pro";
import { useCallback, useState } from "react";
import { type ChangeEvent, useCallback, useState } from "react";
import { useIntl } from "react-intl";
import { useDebounce } from "use-debounce";

Expand Down Expand Up @@ -72,10 +72,9 @@ function ManufacturerFilter({ item, applyValue, apiRef }: GridFilterInputValuePr
<rootProps.slots.baseTextField
{...params}
autoComplete="off"
variant="standard"
placeholder={intl.formatMessage({ id: "manufacturer-filter.placeholder", defaultMessage: "Choose a manufacturer" })}
value={search ? search : null}
onChange={(event) => {
value={search}
onChange={(event: ChangeEvent<HTMLInputElement>) => {
setSearch(event.target.value);
}}
label={apiRef.current.getLocaleText("filterPanelInputLabel")}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion demo/admin/src/products/generator/generated/ProductsGrid.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export function ProductHighlightsGrid() {
slots={{
toolbar: ProductHighlightsGridToolbar as GridSlotsComponent["toolbar"],
}}
showToolbar
/>
);
}
4 changes: 3 additions & 1 deletion demo/admin/src/products/tags/ProductTagsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
FillSpace,
type GridColDef,
GridFilterButton,
GridToolbarQuickFilter,
muiGridFilterToGql,
muiGridSortToGql,
StackLink,
Expand All @@ -15,7 +16,7 @@ import {
} from "@comet/admin";
import { Add as AddIcon, Edit as EditIcon } from "@comet/admin-icons";
import { IconButton } from "@mui/material";
import { DataGridPro, type GridSlotsComponent, GridToolbarQuickFilter } from "@mui/x-data-grid-pro";
import { DataGridPro, type GridSlotsComponent } from "@mui/x-data-grid-pro";
import { FormattedMessage, useIntl } from "react-intl";

import {
Expand Down Expand Up @@ -124,6 +125,7 @@ export function ProductTagsGrid() {
slots={{
toolbar: ProductTagsGridToolbar as GridSlotsComponent["toolbar"],
}}
showToolbar
/>
);
}
Loading
Loading