Skip to content

Commit

Permalink
fix error of uncontrolled value of a picker, fixes #636
Browse files Browse the repository at this point in the history
  • Loading branch information
ferishili committed Jun 5, 2024
1 parent 3aacb53 commit c5b13fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/shared/TableFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ const FilterSwitch = ({
autoFocus={true}
inputRef={startDateRef}
className="small-search start-date"
value={startDate}
value={startDate ?? null}
format="dd/MM/yyyy"
onChange={(date) => handleDate(date as Date | null, true)}
// FixMe: onAccept does not trigger if the already set value is the same as the selected value
Expand All @@ -492,7 +492,7 @@ const FilterSwitch = ({
<DatePicker
inputRef={endDateRef}
className="small-search end-date"
value={endDate}
value={endDate ?? null}
format="dd/MM/yyyy"
onChange={(date) => handleDate(date as Date | null)}
// FixMe: See above
Expand Down

0 comments on commit c5b13fd

Please sign in to comment.