Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Move default population to class method instead of constructor #1638

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

mikejolley
Copy link
Member

#1613 introduced a bug where attributes could not longer be changed (sorry!). This was due to running default-population on construct, and using that value for attributes forever. This prevented updates from taking effect.

By moving this logic to a class method, it can run on render() and mount to ensure defaults are applied to the current attributes, rather than just the initial attributes.

How to test the changes in this Pull Request:

  1. Check you can edit rows/columns for the all products block
  2. Check that when you insert the block for first time, rows and columns are 3 (defaults)

@mikejolley mikejolley added the skip-changelog PRs that you don't want to appear in the changelog. label Jan 23, 2020
@mikejolley mikejolley requested a review from a team January 23, 2020 14:06
@mikejolley mikejolley self-assigned this Jan 23, 2020
@mikejolley mikejolley merged commit 2e96e57 into master Jan 23, 2020
@mikejolley mikejolley deleted the fix/block-list-block branch January 23, 2020 14:11
@nerrad nerrad added this to the 2.6.0 milestone Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
skip-changelog PRs that you don't want to appear in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants