OHIF-299: Fix Study Date sorting on Study List when clicking the label (#1966)

This commit is contained in:
Igor Octaviano authored and GitHub committed 2020-08-06 12:36:28 +02:00
1 parent 8e6b3ac580
commit fe52037fc2
1 file changed
+10 -1
@@ -12,12 +12,18 @@ const InputDateRange = ({
onChange,
}) => {
const { startDate, endDate } = value;
const onClickHandler = (event) => {
event.preventDefault();
onLabelClick(event);
};
return (
<InputLabelWrapper
label={label}
isSortable={isSortable}
sortDirection={sortDirection}
onLabelClick={onLabelClick}
onLabelClick={onClickHandler}
>
<div className="relative">
<DateRange
@@ -30,8 +36,11 @@ const InputDateRange = ({
);
};
const noop = () => { };
InputDateRange.defaultProps = {
value: {},
onLabelClick: noop
};
InputDateRange.propTypes = {