-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix various issues with how List and Map advertised Get/Set #1711
Conversation
This is required so we can correct Get and Set
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.
Love the direction :) This allows us to (ini
json
yaml
) Unmarshal
and Set()
as discussed in Slack, without having to create and re-assign the binding variable.
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.
[ not a reviewer, but ]
Considering the discussion in slack, I think this implementation looks well, and would handle (for example) Unmarshal
correctly now. The only missing bit belongs in another PR anyways (concerning the Reload
method.)
This feels more consistent with the other binding types. It looks good to me.
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.
Looks like a sane approach to me.
Issues raised during chat about re-loading data in binding
a) Get and Set were not possible for the underlying list or struct, so the current Get/Set was renamed GetValue/SetValue
b) New Get and Set were added to provide access to the core data, checking for changes where possible for set
c) trigger the container on size/key change and otherwise trigger value listeners if the data item changed.
d) export the
Untyped
type because sometimes we will need it just likeInt
Checklist: