-
Notifications
You must be signed in to change notification settings - Fork 335
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 default-values for multiple-select in blocks #5576
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prokyonn
force-pushed
the
bugfix/block-default-values
branch
from
October 28, 2020 16:50
869cdd8
to
88b4bfa
Compare
alexander-schranz
added
the
Bug
Error or unexpected behavior of already existing functionality
label
Oct 28, 2020
Prokyonn
force-pushed
the
bugfix/block-default-values
branch
from
October 29, 2020 09:36
71c1d7a
to
8f46ccc
Compare
Prokyonn
force-pushed
the
bugfix/block-default-values
branch
from
October 29, 2020 11:55
b8d0d32
to
86fe6af
Compare
Reminder: Check if we need to do something similar for the |
Prokyonn
force-pushed
the
bugfix/block-default-values
branch
from
November 2, 2020 07:23
86fe6af
to
64405a6
Compare
danrot
suggested changes
Nov 2, 2020
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 think that's a better solution than the two I came up with 👍
So I am generally fine with that, still added a few minor issues resp. questions for better understanding.
src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/FieldBlocks.js
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/FieldBlocks.js
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/FieldBlocks.js
Show resolved
Hide resolved
src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/tests/FieldBlocks.test.js
Outdated
Show resolved
Hide resolved
src/Sulu/Bundle/AdminBundle/Resources/js/containers/FieldBlocks/tests/FieldBlocks.test.js
Show resolved
Hide resolved
Prokyonn
force-pushed
the
bugfix/block-default-values
branch
from
November 2, 2020 10:58
199d4b3
to
f500c94
Compare
danrot
approved these changes
Nov 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this PR?
Fixes the default-values in blocks. See #4987
An additional
value
attribute is introduced to save the state of thevalue
. Previously thevalue
was saved in the properties (this.props
), but the properties are updated after thedefault-value
is set for the nextsingle_select
, thus thevalue
is not up to date during the rendering of the other components.Now the new
value
attribute is manually updated before the next component is rendered.Why?
The default value was only working for the last component.
Todo