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

fix: Remove search-specific properties from nodes on clear #367

Closed
wants to merge 2 commits into from

Conversation

MJRuskin
Copy link
Contributor

@MJRuskin MJRuskin commented Apr 28, 2020

What does it do?

The "_isMatch" property is never cleared, so non-matching parents will still be shown (not greyed-out) and can be focused (i.e. navigation with the arrow keys)..

This fixes that issue by setting all parents to hidden, unless they themselves are a match. They will still be shown with keepTreeOnSearch, because the "matchInChildren" property is set to true.

Fixes # (issue)

No issueNumber

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • Updated documentation (if applicable)
  • Added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes generate no new warnings

@coveralls
Copy link

coveralls commented Apr 28, 2020

Pull Request Test Coverage Report for Build 1366

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 93.787%

Totals Coverage Status
Change from base Build 1363: 0.02%
Covered Lines: 596
Relevant Lines: 618

💛 - Coveralls

@MJRuskin
Copy link
Contributor Author

There is likely a more elegant way to resolve this problem, but this was the least intrusive code I could think of.

@MJRuskin
Copy link
Contributor Author

Apologies for the force push, it seems like my previous version wasn't a complete fix. I have identified the issue properly, it is caused by the "_isMatch" property, and have created a better solution.

@codeclimate
Copy link

codeclimate bot commented Apr 30, 2020

Code Climate has analyzed commit 55320e3 and detected 0 issues on this pull request.

View more on Code Climate.

@mrchief
Copy link
Collaborator

mrchief commented Apr 30, 2020

Hey, thanks for sending this. I'll look into it and get it merged soon.

@stale
Copy link

stale bot commented May 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 15, 2020
@stale stale bot closed this May 22, 2020
@MJRuskin
Copy link
Contributor Author

@mrchief any chance we could reopen this?

@mrchief
Copy link
Collaborator

mrchief commented May 26, 2020

Yes, sorry. This shouldn't have gotten closed.

@mrchief
Copy link
Collaborator

mrchief commented May 26, 2020

Not able to reopen it, probably because of this?
image

@MJRuskin
Copy link
Contributor Author

Ah... damn...
I merged in the changes from develop, originally hoping it would remove the stale tag.
I guess it didn't update like the open branches

@MJRuskin
Copy link
Contributor Author

I returned the branch to its original state (before the merge).
Let me know if that fixes the issue.

If not, I will recreate the PR (lesson learned!)

@mrchief
Copy link
Collaborator

mrchief commented May 26, 2020

:) Reopen is still disabled.

@MJRuskin
Copy link
Contributor Author

@mrchief apologies for the hassle, I've reopened the PR here #377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants