Skip to content
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

Be more explicit on changed fields when updating choropleth form #1490

Merged
merged 2 commits into from Jan 3, 2024

Conversation

yohanboniface
Copy link
Member

The postUpdate method of the Choropleth layer is called after any form field change, even if this field is not in the dedicated choropleth helper. So the previous check was too broad, and it would try to fetch the breaks input value on any form helper, which would fail if someone change any "non choropleth" property (like the colour)

The postUpdate method of the Choropleth layer is called after
any form field change, even if this field is not in the dedicated
choropleth helper. So the previous check was too broad, and it
would try to fetch the breaks input value on any form helper, which
would fail if someone change any "non choropleth" property (like
the colour)
Copy link
Contributor

@davidbgk davidbgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be pertinent to have a dedicated postUpdateChoropleth?

@yohanboniface
Copy link
Member Author

Would it be pertinent to have a dedicated postUpdateChoropleth?

I had a look at this scenario, but I've seen that there is some case (actually one…) where a layer want to update itself after another property has been changed (color in this case), so I've preferred to keep the system generic.

@yohanboniface yohanboniface merged commit fb6230d into master Jan 3, 2024
12 checks passed
@yohanboniface yohanboniface deleted the fix-choropleth-update branch January 3, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants