File tree Expand file tree Collapse file tree
workbench/browser/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,8 +206,8 @@ export interface IActionProvider {
206206
207207export interface IDropdownMenuOptions extends IBaseDropdownOptions {
208208 contextMenuProvider : IContextMenuProvider ;
209- actions ?: IAction [ ] ;
210- actionProvider ?: IActionProvider ;
209+ readonly actions ?: IAction [ ] ;
210+ readonly actionProvider ?: IActionProvider ;
211211 menuClassName ?: string ;
212212 menuAsChild ?: boolean ; // scope down for #99448
213213}
Original file line number Diff line number Diff line change @@ -78,19 +78,15 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
7878 return null ;
7979 } ;
8080
81+ const isActionsArray = Array . isArray ( this . menuActionsOrProvider ) ;
8182 const options : IDropdownMenuOptions = {
8283 contextMenuProvider : this . contextMenuProvider ,
8384 labelRenderer : labelRenderer ,
84- menuAsChild : this . options . menuAsChild
85+ menuAsChild : this . options . menuAsChild ,
86+ actions : isActionsArray ? this . menuActionsOrProvider as IAction [ ] : undefined ,
87+ actionProvider : isActionsArray ? undefined : this . menuActionsOrProvider as IActionProvider
8588 } ;
8689
87- // Render the DropdownMenu around a simple action to toggle it
88- if ( Array . isArray ( this . menuActionsOrProvider ) ) {
89- options . actions = this . menuActionsOrProvider ;
90- } else {
91- options . actionProvider = this . menuActionsOrProvider as IActionProvider ;
92- }
93-
9490 this . dropdownMenu = this . _register ( new DropdownMenu ( container , options ) ) ;
9591 this . _register ( this . dropdownMenu . onDidChangeVisibility ( visible => {
9692 this . element ?. setAttribute ( 'aria-expanded' , `${ visible } ` ) ;
Original file line number Diff line number Diff line change @@ -610,7 +610,12 @@ export class MoveViewAction extends Action {
610610 return new Promise ( ( resolve , reject ) => {
611611 quickPick . onDidAccept ( ( ) => {
612612 const viewId = quickPick . selectedItems [ 0 ] ;
613- resolve ( viewId . id ) ;
613+ if ( viewId . id ) {
614+ resolve ( viewId . id ) ;
615+ } else {
616+ reject ( ) ;
617+ }
618+
614619 quickPick . hide ( ) ;
615620 } ) ;
616621
You can’t perform that action at this time.
0 commit comments