diff --git a/apps/meteor/client/views/admin/rooms/RoomsTable.tsx b/apps/meteor/client/views/admin/rooms/RoomsTable.tsx index c480fab9f657..094ccb95857a 100644 --- a/apps/meteor/client/views/admin/rooms/RoomsTable.tsx +++ b/apps/meteor/client/views/admin/rooms/RoomsTable.tsx @@ -22,14 +22,15 @@ import RoomsTableFilters from './RoomsTableFilters'; type RoomFilters = { searchText: string; types: OptionProp[]; - visibility: OptionProp[]; }; +const DEFAULT_TYPES = ['d', 'p', 'c', 'l', 'discussions', 'teams']; + const RoomsTable = ({ reload }: { reload: MutableRefObject<() => void> }): ReactElement => { const t = useTranslation(); const mediaQuery = useMediaQuery('(min-width: 1024px)'); - const [roomFilters, setRoomFilters] = useState({ searchText: '', types: [], visibility: [] }); + const [roomFilters, setRoomFilters] = useState({ searchText: '', types: [] }); const prevRoomFilterText = useRef(roomFilters.searchText); @@ -47,7 +48,7 @@ const RoomsTable = ({ reload }: { reload: MutableRefObject<() => void> }): React sort: `{ "${sortBy}": ${sortDirection === 'asc' ? 1 : -1} }`, count: itemsPerPage, offset: searchText === prevRoomFilterText.current ? current : 0, - types: [...roomFilters.types.map((roomType) => roomType.id)], + types: roomFilters.types.length ? [...roomFilters.types.map((roomType) => roomType.id)] : DEFAULT_TYPES, }; }, [searchText, sortBy, sortDirection, itemsPerPage, current, roomFilters.types, setCurrent]), 500,