Skip to content

Commit

Permalink
Merge pull request #1105 from gchq/feature/BAI-1177-add-loading-to-en…
Browse files Browse the repository at this point in the history
…tity-selector

added loading to entityselector
  • Loading branch information
ARADDCC002 authored Feb 21, 2024
2 parents 27ae508 + 178510d commit 9422af7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/MuiForms/EntitySelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function EntitySelector(props: EntitySelectorProps) {
const [userListQuery, setUserListQuery] = useState('')
const [selectedEntities, setSelectedEntities] = useState<EntityObject[]>([])

const { users, isUsersError } = useListUsers(userListQuery)
const { users, isUsersLoading, isUsersError } = useListUsers(userListQuery)
const { currentUser, isCurrentUserLoading, isCurrentUserError } = useGetCurrentUser()

const theme = useTheme()
Expand Down Expand Up @@ -80,6 +80,7 @@ export default function EntitySelector(props: EntitySelectorProps) {
<Autocomplete<EntityObject, true, true>
multiple
data-test='entitySelector'
loading={userListQuery.length > 3 && isUsersLoading}
open={open}
size='small'
onOpen={() => {
Expand Down

0 comments on commit 9422af7

Please sign in to comment.