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
I am trying to display events with profile pictures, and I was wondering if there's a way to use a svelte component.
Right now I solved it by setting a function for eventContent option, which returns a manually constructed html, but this duplicates all the code I already have in a <ProfilePicture {name} {pictureUrl} /> component.
Is there a better way of doing it I am not aware of? ( If I'm right, svelte slots are not utilized in the component )
EDIT:
A bit better way I came up was having ProfilePicture.render({name:'$name',pictureUrl:'$pictureUrl'}) on the backend and pass it to the frontend, where I replace $name and $pictureUrl for the appropriate events, but having a default picture for empty pictureUrl is still an externalized logic.
Thank you,
Mihaly
The text was updated successfully, but these errors were encountered:
Unfortunately, the calendar does not currently support any slots. I agree that such a feature would be very useful for a Svelte project. Therefore, in future versions I will try to solve this issue.
Hello!
I am trying to display events with profile pictures, and I was wondering if there's a way to use a svelte component.
Right now I solved it by setting a function for
eventContent
option, which returns a manually constructed html, but this duplicates all the code I already have in a<ProfilePicture {name} {pictureUrl} />
component.Is there a better way of doing it I am not aware of? ( If I'm right, svelte slots are not utilized in the component )
EDIT:
A bit better way I came up was having
ProfilePicture.render({name:'$name',pictureUrl:'$pictureUrl'})
on the backend and pass it to the frontend, where I replace $name and $pictureUrl for the appropriate events, but having a default picture for empty pictureUrl is still an externalized logic.Thank you,
Mihaly
The text was updated successfully, but these errors were encountered: