-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing the geplandOpenbaar of an agendapoint affects the openbaar of a behandeling #273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what the did-update
modifier is trying to achieve. I could not trigger it. Can someone explain?
Also, can the modifier be put on the top level component in this file? The effect should be the same, but that would make this PR much cleaner, by just adding 1 single line in this file.
I'm not sure if it's needed here. The did-update notifier is typically useful if you have an argument passed into a component and want to trigger some function if the the value of the argument is updated. it can't be added to a component because it will be considered an attribute that's passed down into the component. However it could be added on another element, I don't think a wrapping div is required here and I also dislike the addition. @lagartoverde Can you elaborate why the did-update modifier is needed here? |
We ran into a bug in a previous support item, where the component was failing because the constructor was not being called in the production build as the elements were reused, that's why I added it here, so it would ran every time the argument was changed and not only on the construction of the element. |
oldGeplandOpenbaar; | ||
constructor() { | ||
super(...arguments); | ||
this.oldGeplandOpenbaar = this.args.itemToEdit.geplandOpenbaar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you not just using a getter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I want to get the original value when the component was created not the actual value of the variable
I removed the did-update modifier as you didn't like it |
fb3445a
to
f3f73f0
Compare
Solves https://binnenland.atlassian.net/browse/GN-3425