Add And Remove Items when Collection is Changed #31
bbaileyHOM
started this conversation in
Ideas
Replies: 1 comment 3 replies
|
Thanks, I'm happy to contribute the community. And thanks for the idea and thoughts! Updates can come from the UI and those changes are synced with collection. Correct me if I misunderstood, I think you're wanting to make changes or add events from code/server-side/C# and push just those incremental schedules down to the calendar? Happy to collaborate, just want to make sure I'm in the same page. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
First, thank you for doing the leg work on making this work in Blazor!
Is there a reason that the items on the calendar aren't updated with the Schedules collection is changed? Is there another way in which changes to the calendar are expected to be add/removed from the calendar? I wasn't able to determine if there was.
I downloaded the project and the made the following changes to TUISchedule.cs:
added:
private ICollection<TUISchedule> _schedules;altered:
Any time the collection changes the calendar is cleared and all schedules are recreated. It might be better to use ObservableCollection and add/remove/update but that is a bit more complicated and I am not sure if there is a lot of value in it.
All reactions