diff --git a/.changeset/tender-cheetahs-teach.md b/.changeset/tender-cheetahs-teach.md
new file mode 100644
index 00000000000..bbb956d7471
--- /dev/null
+++ b/.changeset/tender-cheetahs-teach.md
@@ -0,0 +1,6 @@
+---
+'@rocket.chat/ui-client': patch
+'@rocket.chat/meteor': patch
+---
+
+Fixed an issue where "Filter by room type" was selectable in the Rooms filter.
diff --git a/apps/meteor/client/views/admin/rooms/RoomsTableFilters.tsx b/apps/meteor/client/views/admin/rooms/RoomsTableFilters.tsx
index 2ec5954332f..5d84c451df9 100644
--- a/apps/meteor/client/views/admin/rooms/RoomsTableFilters.tsx
+++ b/apps/meteor/client/views/admin/rooms/RoomsTableFilters.tsx
@@ -9,6 +9,7 @@ const initialRoomTypeFilterStructure = [
{
id: 'filter_by_room',
text: 'Filter_by_room',
+ isGroupTitle: true,
},
{
id: 'd',
diff --git a/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx
index 0855e5fc68c..7694dda2944 100644
--- a/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx
+++ b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustom.tsx
@@ -24,6 +24,7 @@ export type OptionProp = {
id: string;
text: string;
checked?: boolean;
+ isGroupTitle?: boolean;
};
/**
diff --git a/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.spec.tsx b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.spec.tsx
new file mode 100644
index 00000000000..7d8596d8f0e
--- /dev/null
+++ b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.spec.tsx
@@ -0,0 +1,44 @@
+import { render, screen } from '@testing-library/react';
+
+import MultiSelectCustomList from './MultiSelectCustomList';
+
+it('should render options with correct checked state', () => {
+ render(
+ ,
+ { legacyRoot: true },
+ );
+
+ const option1 = screen.getByLabelText('Option 1');
+ expect(option1).toBeInTheDocument();
+ expect(option1).toBeChecked();
+
+ const option2 = screen.getByLabelText('Option 2');
+ expect(option2).toBeInTheDocument();
+ expect(option2).not.toBeChecked();
+});
+
+it('should not render group title as selectable option', () => {
+ render(
+ ,
+ { legacyRoot: true },
+ );
+
+ expect(screen.getByText('Group title')).toBeInTheDocument();
+ expect(screen.queryByRole('checkbox', { name: /Group title/i })).not.toBeInTheDocument();
+
+ const option1 = screen.getByLabelText('Option 1');
+ expect(option1).toBeInTheDocument();
+ expect(option1).not.toBeChecked();
+});
diff --git a/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
index d73d9ce6b88..7a2268743fd 100644
--- a/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
+++ b/packages/ui-client/src/components/MultiSelectCustom/MultiSelectCustomList.tsx
@@ -40,8 +40,8 @@ const MultiSelectCustomList = ({
)}
{filteredOptions.map((option) => (
- {!option.hasOwnProperty('checked') ? (
-
+ {option.isGroupTitle || !option.hasOwnProperty('checked') ? (
+
{t(option.text as TranslationKey)}
) : (