mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #34383 from overleaf/em-fix-new-project-dropdown-alignment
Fix "New project" dropdown shifting to viewport edge in library layout GitOrigin-RevId: f6b8af3e4d15828847ff69423a1c475efd2e32a9
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
DropdownMenu,
|
||||
DropdownToggle,
|
||||
} from '@/shared/components/dropdown/dropdown-menu'
|
||||
import type { DropdownProps } from '@/shared/components/types/dropdown-menu-props'
|
||||
import { useSendProjectListMB } from '@/features/project-list/components/project-list-events'
|
||||
import type { PortalTemplate } from '../../../../../types/portal-template'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
@@ -45,6 +46,7 @@ type NewProjectButtonProps = {
|
||||
className?: string
|
||||
trackingKey?: string
|
||||
showAddAffiliationWidget?: boolean
|
||||
align?: DropdownProps['align']
|
||||
}
|
||||
|
||||
function NewProjectButton({
|
||||
@@ -53,6 +55,7 @@ function NewProjectButton({
|
||||
className,
|
||||
trackingKey,
|
||||
showAddAffiliationWidget,
|
||||
align,
|
||||
}: NewProjectButtonProps) {
|
||||
const { t } = useTranslation()
|
||||
const { templateLinks } = getMeta('ol-ExposedSettings')
|
||||
@@ -174,6 +177,7 @@ function NewProjectButton({
|
||||
return (
|
||||
<>
|
||||
<Dropdown
|
||||
align={align}
|
||||
className={classnames('new-project-dropdown', className)}
|
||||
onSelect={handleMainButtonClick}
|
||||
onToggle={nextShow => {
|
||||
|
||||
@@ -137,6 +137,7 @@ export function ProjectListDsNav() {
|
||||
<NewProjectButton
|
||||
id="new-project-button-projects-table"
|
||||
showAddAffiliationWidget
|
||||
align="end"
|
||||
/>
|
||||
</OLCol>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user