Commit 369acc0
fix(cmdk): Filter empty resource nodes from group children in search mode
The matched-child filter in search mode only checked scores but not
isEmptyResourceNode, so an async group container with 0 results nested
inside a group (e.g. "Reverse DSN lookup" under "Navigate") would pass
the filter and appear as a clickable action when the group label matched
the query.
Apply the same isEmptyResourceNode guard to the per-child filter that
browse mode already uses, and add a regression test for the case.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2e92f67 commit 369acc0
File tree
2 files changed
+32
-1
lines changed- static/app/components/commandPalette/ui
2 files changed
+32
-1
lines changedLines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
704 | 733 | | |
705 | 734 | | |
706 | 735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
522 | 524 | | |
523 | 525 | | |
524 | 526 | | |
| |||
0 commit comments