umbraco-community / Our.Umbraco.OpeningHours

An Umbraco property editor for handling opening hours
MIT License
9 stars 13 forks source link

Weekday directive looses "connection" to parent scope #33

Open enkelmedia opened 5 years ago

enkelmedia commented 5 years ago

I've played around with this great property editor but after making some changes i the dropdowns for opening hours the parent model does not get updated anymore.

I've added some debugging to the views and the model inside the holiday-directive gets updated correctly and the first couple of times I update the drop downs the parent mode (model.value.holidays) is also updates. But after some time (it's random) the parent models does not get updated any more.

I've tried to figure out what the problem is but I can't really figure it out at the moment. Anybody else that have seen this issue?

parent direcitve

enkelmedia commented 5 years ago

I think I've figured out the issue.

When we save and publish, the model from the server is passed back again and the "parent" model is updated. When this happens, the "connection" between them breaks. I need to look closer at this and see if there is something we can do about that.