Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
somebody1234 committed Aug 20, 2024
1 parent c2713c1 commit c0871dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function useForm<Schema extends types.TSchema>(
const defaults = initialDefaultValues.current
if (defaults) {
if (typeof defaults !== 'function') {
form.reset(defaults, { keepDirtyValues: true })
form.reset(defaults)
}
}
}, [form])
Expand Down
36 changes: 19 additions & 17 deletions app/dashboard/src/layouts/AssetPanel/NewProjectExecutionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,25 @@ export default function NewProjectExecutionModal(props: NewProjectExecutionModal
/>
<Text>{getText(PARALLEL_MODE_TO_DESCRIPTION_ID[parallelMode])}</Text>
</div>
<DatePicker
form={form}
isRequired
name="date"
label={getText('firstOccurrenceLabel')}
noCalendarHeader
minValue={minFirstOccurrence}
maxValue={maxFirstOccurrence}
/>
{repeatInterval !== 'hourly' && (
<Text>
{getText(
'repeatsAtX',
repeatTimes.map((time) => toCalendarDate(time).toString()).join(', '),
)}
</Text>
)}
<div className="flex flex-col">
<DatePicker
form={form}
isRequired
name="date"
label={getText('firstOccurrenceLabel')}
noCalendarHeader
minValue={minFirstOccurrence}
maxValue={maxFirstOccurrence}
/>
{repeatInterval !== 'hourly' && (
<Text>
{getText(
'repeatsAtX',
repeatTimes.map((time) => toCalendarDate(time).toString()).join(', '),
)}
</Text>
)}
</div>
<Input
form={form}
name="maxDurationMinutes"
Expand Down

0 comments on commit c0871dc

Please sign in to comment.