popupDetailBody implementation #1279
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That's just a default template value. the First, you need to set an arbitrary value to the and I suggest you store any extra values in the const yourEventObject = {
id,
title,
// ...
body: 'use-popupDetailBody' // any string except empty one.
raw: {
lead: '???'
}
}; Then you can now use the const calendarOptions = {
// ...
template: {
popupDetailBody(eventObject) {
const lead = eventObject.raw.lead;
return `Lead: ${lead}`; // or HTML string
}
}
}; Example: https://playcode.io/961691 |
Beta Was this translation helpful? Give feedback.
That's just a default template value. the
popupDetailBody
template function takes theEventObject
itself and you can leverage it.First, you need to set an arbitrary value to the
body
property. because the detail popup doesn't expose thepopupDetailBody
template if thebody
property is empty.tui.calendar/apps/calendar/src/components/popup/eventDetailSectionDetail.tsx
Lines 75 to 81 in 29a095d
and I suggest you store any extra values in the
raw
property of the event…