Skip to content

Commit

Permalink
fix: hide icon tick when clear date
Browse files Browse the repository at this point in the history
  • Loading branch information
tungnguyendinh committed May 7, 2024
1 parent e4c0b09 commit 133d55d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/commons/CustomFilter/DateRangeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const DateRangeModal: React.FC<DateRangeModalProps> = ({ onClose, onDateRangeCha
onClose?.();
if (dateRange[0] === null || dateRange[1] === null) {
onClearValue && onClearValue({ fromDate: "", toDate: "" });
onDateRangeChange({ fromDate: "", toDate: "" });
}
};

Expand Down
4 changes: 3 additions & 1 deletion src/pages/ProtocolParameter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,9 @@ export const FilterComponent: React.FC<FilterComponentProps> = ({
{t("filter.daterange")}
</Box>
</Box>
{!isEmpty(dateRange) && <BsFillCheckCircleFill size={14} color={theme.palette.primary.main} />}
{Boolean(dateRange.fromDate) && Boolean(dateRange.toDate) && (
<BsFillCheckCircleFill size={14} color={theme.palette.primary.main} />
)}
</Box>
</ButtonFilter>

Expand Down

0 comments on commit 133d55d

Please sign in to comment.