From 1ca1059673175e1a66e0f566375f9d65b31a0845 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Mon, 4 May 2026 20:59:46 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=2010=20users/roles=20per=20p?= =?UTF-8?q?age?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/roles-selector.tsx | 14 ++------------ src/components/users-selector.tsx | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/components/roles-selector.tsx b/src/components/roles-selector.tsx index bf682bb31..7f1b62e60 100644 --- a/src/components/roles-selector.tsx +++ b/src/components/roles-selector.tsx @@ -5,8 +5,6 @@ import { useDebounce } from "use-debounce"; import { useTranslations } from "next-intl"; import { MultiSelectTagInput } from "./multi-select/multi-select-tag-input"; -import { usePaidStatus } from "@app/hooks/usePaidStatus"; -import { TierFeature, tierMatrix } from "@server/lib/billing/tierMatrix"; export type SelectedRole = { id: string; text: string }; @@ -29,15 +27,13 @@ export function RolesSelector({ mapRolesByName, buttonText }: RolesSelectorProps) { - const { isPaidUser } = usePaidStatus(); - const canSelectMultipleUsers = isPaidUser(tierMatrix.fullRbac); const t = useTranslations(); const [roleSearchQuery, setRoleSearchQuery] = useState(""); const [debouncedValue] = useDebounce(roleSearchQuery, 150); const { data: roles = [] } = useQuery( - orgQueries.roles({ orgId, perPage: 7, query: debouncedValue }) + orgQueries.roles({ orgId, perPage: 10, query: debouncedValue }) ); // always include the selected roles in the list (if the user isn't searching) @@ -78,13 +74,7 @@ export function RolesSelector({ onSearch={setRoleSearchQuery} options={rolesShown} value={selectedRoles} - onChange={(newRoles) => { - let roles = canSelectMultipleUsers - ? [...newRoles] - : [newRoles[0]]; - - onSelectRoles(roles); - }} + onChange={onSelectRoles} disabled={disabled} /> ); diff --git a/src/components/users-selector.tsx b/src/components/users-selector.tsx index aed063fd7..5cbe90e89 100644 --- a/src/components/users-selector.tsx +++ b/src/components/users-selector.tsx @@ -31,7 +31,7 @@ export function UsersSelector({ const [debouncedValue] = useDebounce(userSearchQuery, 150); const { data: users = [] } = useQuery( - orgQueries.users({ orgId, perPage: 7, query: debouncedValue }) + orgQueries.users({ orgId, perPage: 10, query: debouncedValue }) ); // always include the selected users in the list (if the user isn't searching)