mirror of https://github.com/langgenius/dify.git
fix: add time-picker placement prop
This commit is contained in:
parent
0b1015e221
commit
7d56ca5294
|
|
@ -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 = ({
|
|||
<PortalToFollowElem
|
||||
open={isOpen}
|
||||
onOpenChange={setIsOpen}
|
||||
placement='bottom-start'
|
||||
placement={placement}
|
||||
>
|
||||
<PortalToFollowElemTrigger className={triggerFullWidth ? '!block w-full' : undefined}>
|
||||
{renderTrigger ? (renderTrigger({
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ const AutoUpdateSetting: FC<Props> = ({
|
|||
title={t(`${i18nPrefix}.updateTime`)}
|
||||
minuteFilter={minuteFilter}
|
||||
renderTrigger={renderTimePickerTrigger}
|
||||
placement='bottom-end'
|
||||
/>
|
||||
<div className='body-xs-regular mt-1 text-right text-text-tertiary'>
|
||||
<Trans
|
||||
|
|
|
|||
Loading…
Reference in New Issue