From 7d56ca52943a6d615cffbaf8626ec7c909006011 Mon Sep 17 00:00:00 2001 From: lyzno1 Date: Tue, 28 Oct 2025 15:49:10 +0800 Subject: [PATCH] fix: add time-picker placement prop --- .../components/base/date-and-time-picker/time-picker/index.tsx | 3 ++- web/app/components/base/date-and-time-picker/types.ts | 2 ++ .../reference-setting-modal/auto-update-setting/index.tsx | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/app/components/base/date-and-time-picker/time-picker/index.tsx b/web/app/components/base/date-and-time-picker/time-picker/index.tsx index 4ad9c2a625..9577a107e5 100644 --- a/web/app/components/base/date-and-time-picker/time-picker/index.tsx +++ b/web/app/components/base/date-and-time-picker/time-picker/index.tsx @@ -39,6 +39,7 @@ const TimePicker = ({ notClearable = false, triggerFullWidth = false, showTimezone = false, + placement = 'bottom-start', }: TimePickerProps) => { const { t } = useTranslation() const [isOpen, setIsOpen] = useState(false) @@ -204,7 +205,7 @@ const TimePicker = ({ {renderTrigger ? (renderTrigger({ diff --git a/web/app/components/base/date-and-time-picker/types.ts b/web/app/components/base/date-and-time-picker/types.ts index 9116e3d937..d665cea601 100644 --- a/web/app/components/base/date-and-time-picker/types.ts +++ b/web/app/components/base/date-and-time-picker/types.ts @@ -68,6 +68,8 @@ export type TimePickerProps = { triggerFullWidth?: boolean /** Show timezone label inline with the time picker */ showTimezone?: boolean + /** Placement of the popup relative to the trigger */ + placement?: 'bottom-start' | 'bottom-end' | 'bottom' } export type TimePickerFooterProps = { diff --git a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx index 2d00788142..61c2f60e14 100644 --- a/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx +++ b/web/app/components/plugins/reference-setting-modal/auto-update-setting/index.tsx @@ -143,6 +143,7 @@ const AutoUpdateSetting: FC = ({ title={t(`${i18nPrefix}.updateTime`)} minuteFilter={minuteFilter} renderTrigger={renderTimePickerTrigger} + placement='bottom-end' />