Repository navigation
Conversation
`isMin` gates the delete button in the group and table extensions, but it was computed from `meta.max`. Two consequences: - with both bounds set, the button stays enabled below `min`, so entries can be removed past the lower bound - with only `max` set, the button is disabled as soon as the array is full, so entries cannot be removed at all
This branch has not been deployed
This file contains hidden or 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
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.
isMinis used to disable the delete button in the group and table extensions:but it is computed from
meta.max:Two consequences:
Schema.array(X).min(2).max(5)) — at two entriesisMinis2 >= 5= false, so the button stays enabled and entries can be removed pastmin.maxset (Schema.array(X).max(3)) — at three entriesisMinis3 >= 3= true, so the button is disabled and entries cannot be removed at all,even though there is no lower bound.
min/maxare the only two bounds andisMaxalready readsmax, so the fix is thecomparison operand.