OHIF-299: Fix Study Date sorting on Study List when clicking the label (#1966)
This commit is contained in:
parent
8e6b3ac580
commit
fe52037fc2
@ -12,12 +12,18 @@ const InputDateRange = ({
|
|||||||
onChange,
|
onChange,
|
||||||
}) => {
|
}) => {
|
||||||
const { startDate, endDate } = value;
|
const { startDate, endDate } = value;
|
||||||
|
|
||||||
|
const onClickHandler = (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
onLabelClick(event);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<InputLabelWrapper
|
<InputLabelWrapper
|
||||||
label={label}
|
label={label}
|
||||||
isSortable={isSortable}
|
isSortable={isSortable}
|
||||||
sortDirection={sortDirection}
|
sortDirection={sortDirection}
|
||||||
onLabelClick={onLabelClick}
|
onLabelClick={onClickHandler}
|
||||||
>
|
>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<DateRange
|
<DateRange
|
||||||
@ -30,8 +36,11 @@ const InputDateRange = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const noop = () => { };
|
||||||
|
|
||||||
InputDateRange.defaultProps = {
|
InputDateRange.defaultProps = {
|
||||||
value: {},
|
value: {},
|
||||||
|
onLabelClick: noop
|
||||||
};
|
};
|
||||||
|
|
||||||
InputDateRange.propTypes = {
|
InputDateRange.propTypes = {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user