then I had to upgrade the version into Bryntum Scheduler 2.2.5 and now the tooltiip doesnt work.
eventTooltip: {
template: () => false,
listeners: {
beforeShow: ({ source: tip }) => {
makeEventTootip(tip);
}
},
align: 'l-r',
// hide tooltip when the dom scrolls
floating: true,
scrollAction: 'hide',
style: { fontSize: '0.9rem' }
},
async function makeEventTootip(tip) {
indexKey = tip.eventRecord.data.id;
tableName = tip.eventRecord.data.eventType;
eventContextType = tip.eventRecord.data.eventType.toString()[0];
controlData = await db.getTableDataByKey('controllData', 1);
const url = controlData.companyDetails.drillbackURL;
tooltipData = controlData.tooltips.find(eventTooltipInfo => {
return eventTooltipInfo.context === eventContextType;
});
contextFields = tooltipData.fields;
dataRecord = await db.getTableDataByKey(tableName, indexKey);
const contextFieldsList = () => {
const tooltipValuesArray = contextFields.map(field => {
let tooltipValues;
if (field.action) {
const hrefValue = url.concat(field.action, dataRecord[field.field]);
console.log('hrefValue : ', hrefValue);
tooltipValues = `<dt>${
field.title
} : <a href='${hrefValue}' target="_blank">${
dataRecord[field.field]
}</a></dt>`;
} else {
tooltipValues = `<dt>${field.title} : ${dataRecord[field.field]}</dt>`;
}
console.log('tooltipValues : ', tooltipValues);
return tooltipValues;
});
return tooltipValuesArray.join(' ');
};
tip.html = `${contextFieldsList()}`;
}
All i did was upgrading the bryntum version.