File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -140,18 +140,26 @@ class Dropdown {
140140 return false ;
141141 }
142142
143+ /**
144+ * Is Show All selected in the dropdown
145+ * @returns TRUE => Show All is selected, FALSE => Show All is not selected
146+ */
147+ public isShowAllSelected ( ) {
148+ return this . optionsSelected [ 0 ] ;
149+ }
150+
143151 /**
144152 * Select a specific value in the dropdown.
145153 * @param value The value to select.
146154 */
147155 public selectOption ( value : string ) {
148156 const optionIndex = this . options . findIndex ( ( option ) => value === option . value ) ;
149157 if ( optionIndex < 0 && ( this . optionsSelected [ 0 ] || this . optionsSelected [ optionIndex ] ) ) return ;
150- if ( this . multipleAllowed && ! this . selectMultipleWithCtrl ) {
158+ if ( this . multipleAllowed && ! this . selectMultipleWithCtrl && ! this . optionsSelected [ 0 ] ) {
151159 // Select the option with the specified value
152160 this . optionsSelected [ optionIndex ] = true ;
153161 } else {
154- for ( let i = 1 ; i < this . optionsSelected . length ; i ++ ) {
162+ for ( let i = 0 ; i < this . optionsSelected . length ; i ++ ) {
155163 this . optionsSelected [ i ] = false ;
156164 }
157165 this . optionsSelected [ optionIndex ] = true ;
Original file line number Diff line number Diff line change @@ -1134,7 +1134,7 @@ class GitGraphView {
11341134 } ,
11351135 {
11361136 title : 'Select in Branches Dropdown' ,
1137- visible : visibility . selectInBranchesDropdown && ! isSelectedInBranchesDropdown ,
1137+ visible : visibility . selectInBranchesDropdown && ( ! isSelectedInBranchesDropdown || this . branchDropdown . isShowAllSelected ( ) ) ,
11381138 onClick : ( ) => this . branchDropdown . selectOption ( refName )
11391139 } ,
11401140 {
You can’t perform that action at this time.
0 commit comments