We have tooltip template.We want to display tooltip for specific appointment. So if task type is not "travel" we don't want to show tooltip.Please find below method.
tooltipTemplate = (props: Object) => {
if(props.type !== 'travel') {
return null;
}
const endTime = getLodash(props, 'endTime');
const startTime = getLodash(props, 'startTime');
const end = moment(endTime);
const start = moment(startTime);
const duration = moment.duration(end.diff(start)).asHours();
return(
<div>Estimated Travel Time: {duration}hr</div>
);
}
So if type is not 'travel' ,a small tooltip is coming below appointment.Please find screenshot below .How can we remove below small tooltip that our condition
should match
Please find working fine tooltip component below .Here task type is "travel" so we are showing tooltip component.