diff --git a/datahub-web-react/src/app/entity/shared/EntityDropdown/MoveGlossaryEntityModal.tsx b/datahub-web-react/src/app/entity/shared/EntityDropdown/MoveGlossaryEntityModal.tsx index 37a625f58100b..51b39be4e20ea 100644 --- a/datahub-web-react/src/app/entity/shared/EntityDropdown/MoveGlossaryEntityModal.tsx +++ b/datahub-web-react/src/app/entity/shared/EntityDropdown/MoveGlossaryEntityModal.tsx @@ -7,6 +7,7 @@ import { useUpdateParentNodeMutation } from '../../../../graphql/glossary.genera import NodeParentSelect from './NodeParentSelect'; import { useGlossaryEntityData } from '../GlossaryEntityContext'; import { getGlossaryRootToUpdate, getParentNodeToUpdate, updateGlossarySidebar } from '../../../glossary/utils'; +import { getModalDomContainer } from '../../../../utils/focus'; const StyledItem = styled(Form.Item)` margin-bottom: 0; @@ -78,6 +79,7 @@ function MoveGlossaryEntityModal(props: Props) { } + getContainer={getModalDomContainer} >
diff --git a/datahub-web-react/src/app/entity/shared/EntityDropdown/NodeParentSelect.tsx b/datahub-web-react/src/app/entity/shared/EntityDropdown/NodeParentSelect.tsx index c3bfac35c2ca6..e7f5827e33dcc 100644 --- a/datahub-web-react/src/app/entity/shared/EntityDropdown/NodeParentSelect.tsx +++ b/datahub-web-react/src/app/entity/shared/EntityDropdown/NodeParentSelect.tsx @@ -21,6 +21,7 @@ interface Props { selectedParentUrn: string; setSelectedParentUrn: (parent: string) => void; isMoving?: boolean; + autofocus?: boolean; } function NodeParentSelect(props: Props) { @@ -65,6 +66,7 @@ function NodeParentSelect(props: Props) { onClear={clearSelectedParent} onFocus={() => setIsFocusedOnInput(true)} dropdownStyle={isShowingGlossaryBrowser || !searchQuery ? { display: 'none' } : {}} + autoFocus={props.autofocus} > {nodeSearchResults?.map((result) => ( diff --git a/datahub-web-react/src/app/entity/shared/components/styled/AddLinkModal.tsx b/datahub-web-react/src/app/entity/shared/components/styled/AddLinkModal.tsx index 68a8cf4094362..9e18de3b294bf 100644 --- a/datahub-web-react/src/app/entity/shared/components/styled/AddLinkModal.tsx +++ b/datahub-web-react/src/app/entity/shared/components/styled/AddLinkModal.tsx @@ -5,6 +5,7 @@ import { useEntityData, useMutationUrn } from '../../EntityContext'; import { useAddLinkMutation } from '../../../../../graphql/mutations.generated'; import analytics, { EventType, EntityActionType } from '../../../../analytics'; import { useUserContext } from '../../../../context/useUserContext'; +import { getModalDomContainer } from '../../../../../utils/focus'; type AddLinkProps = { buttonProps?: Record; @@ -73,6 +74,7 @@ export const AddLinkModal = ({ buttonProps, refetch }: AddLinkProps) => { Add , ]} + getContainer={getModalDomContainer} > } + getContainer={getModalDomContainer} >