diff --git a/.changeset/few-pillows-remember.md b/.changeset/few-pillows-remember.md new file mode 100644 index 0000000000..8f13651a70 --- /dev/null +++ b/.changeset/few-pillows-remember.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fixed an issue causing the `EntityOwnerPicker` to reset scrolling when more elements are loaded. diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx index 57bf124bf6..ecbdae1d63 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/EntityOwnerPicker.tsx @@ -42,6 +42,7 @@ import { withStyles } from '@material-ui/core/styles'; import { useEntityPresentation } from '../../apis'; import { catalogReactTranslationRef } from '../../translation'; import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; +import { PopperProps } from '@material-ui/core/Popper'; /** @public */ export type CatalogReactEntityOwnerPickerClassKey = 'input'; @@ -188,9 +189,7 @@ export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => { {t('entityOwnerPicker.title')} ( -
{popperProps.children as ReactNode}
- )} + PopperComponent={Popper} multiple disableCloseOnSelect loading={loading} @@ -264,3 +263,7 @@ export const EntityOwnerPicker = (props?: EntityOwnerPickerProps) => { ); }; + +function Popper({ children }: PopperProps) { + return
{children as ReactNode}
; +}