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

This commit is contained in:
Igor Octaviano 2020-08-06 07:36:28 -03:00 committed by GitHub
parent 8e6b3ac580
commit fe52037fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = {