You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-value property support (ATTENDEE, CATEGORIES) #2
// Only updates the first ATTENDEEupdateFields(event,{'ATTENDEE': 'mailto:[email protected]'});
Desired Behavior
// Support array of valuesupdateFields(event,{'ATTENDEE': ['mailto:[email protected]','mailto:[email protected]'],'CATEGORIES': ['MEETING','WORK']});
Implementation Considerations
Need to detect multi-value properties
Handle both single string and array inputs
Preserve property parameters (CN, ROLE, etc. for ATTENDEE)
Stay true to field-agnostic philosophy
Workaround
Use ical.js directly for multi-value properties:
importICALfrom'ical.js';constcomponent=newICAL.Component(ICAL.parse(event.data));constvevent=component.getFirstSubcomponent('vevent');// Add multiple attendeesconstattendees=['mailto:[email protected]','mailto:[email protected]'];// Remove existingvevent.removeAllProperties('attendee');// Add new onesattendees.forEach(email=>{vevent.addPropertyWithValue('attendee',email);});// Use tsdav-utils for other fieldsconstupdated=updateFields(component.toString(),{'SUMMARY': 'Team Meeting'});
Activity