Do not pop if there is nothing to pop#3901
Merged
julienw merged 2 commits intoFeb 24, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3901 +/- ##
=======================================
Coverage 87.19% 87.19%
=======================================
Files 277 277
Lines 23666 23593 -73
Branches 6258 6213 -45
=======================================
- Hits 20636 20573 -63
+ Misses 2786 2778 -8
+ Partials 244 242 -2
Continue to review full report at Codecov.
|
julienw
commented
Feb 21, 2022
| children: React.Node, | ||
| |}; | ||
|
|
||
| class FilterNavigatorBarButton extends React.PureComponent<FilterNavigatorBarButtonProps> { |
Contributor
Author
There was a problem hiding this comment.
I followed the pattern suggested in https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md#lists-of-items
This was referenced Mar 30, 2022
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.
This fixes the following STR:
=> nothing should change, because clicking on the last element pops nothing.
But the call tree is completely compacted instead.
I realized that the FilterNavigatorBar always reports when the last element is clicked. So this is what I changed.
I noticed that when there's a preview selection, clicking the last element will remove the selection. I retained this behavior and made it accessible (previously there were no button for this to work).
There should be no visible change besides these 2 changes.
production
deploy preview