File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
app/components/primer/alpha Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @primer/view-components ' : patch
3
+ ---
4
+
5
+ [ SelectPanel] Don't clear selection if input field doesn't exist
Original file line number Diff line number Diff line change @@ -465,10 +465,13 @@ export class SelectPanelElement extends HTMLElement {
465
465
this . dialog . removeAttribute ( 'data-ready' )
466
466
this . invokerElement ?. setAttribute ( 'aria-expanded' , 'false' )
467
467
// When we close the dialog, clear the filter input
468
- const fireSearchEvent = this . filterInputTextField . value . length > 0
469
- this . filterInputTextField . value = ''
470
- if ( fireSearchEvent ) {
471
- this . filterInputTextField . dispatchEvent ( new Event ( 'input' ) )
468
+
469
+ if ( this . filterInputTextField ) {
470
+ const fireSearchEvent = this . filterInputTextField . value . length > 0
471
+ this . filterInputTextField . value = ''
472
+ if ( fireSearchEvent ) {
473
+ this . filterInputTextField . dispatchEvent ( new Event ( 'input' ) )
474
+ }
472
475
}
473
476
474
477
this . dispatchEvent (
You can’t perform that action at this time.
0 commit comments