diff --git a/portal/src/graphql/adminapi/UsersList.tsx b/portal/src/graphql/adminapi/UsersList.tsx index 4ad686d5bd..3efc8cb94c 100644 --- a/portal/src/graphql/adminapi/UsersList.tsx +++ b/portal/src/graphql/adminapi/UsersList.tsx @@ -12,6 +12,7 @@ import { PersonaSize, Text, MessageBar, + IListProps, } from "@fluentui/react"; import { Context, FormattedMessage } from "@oursky/react-messageformat"; import { Link, useParams } from "react-router-dom"; @@ -35,6 +36,10 @@ import TextCell from "../../components/roles-and-groups/list/common/TextCell"; import ActionButtonCell from "../../components/roles-and-groups/list/common/ActionButtonCell"; import BaseCell from "../../components/roles-and-groups/list/common/BaseCell"; +function onShouldVirtualize(_: IListProps): boolean { + return false; +} + interface UsersListProps { className?: string; isSearch: boolean; @@ -460,6 +465,8 @@ const UsersList: React.VFC = function UsersList(props) { layoutMode={DetailsListLayoutMode.justified} columns={columns} items={items} + // UserList always render fixed number of items, which is not infinite scroll, so no need virtualization + onShouldVirtualize={onShouldVirtualize} /> {!isSearch ? (