@@ -33,7 +33,6 @@ export class BrowsePanel
3333 protected treeActions : TreeGridActions < ViewItem > ;
3434 protected filterPanelToBeShownFullScreen : boolean = false ;
3535 protected gridAndItemsSplitPanel : SplitPanel ;
36- private gridAndToolbarPanel : Panel ;
3736 private browseItemPanel : BrowseItemPanel ;
3837 private filterAndGridSplitPanel : SplitPanel ;
3938 private filterPanelForcedShown : boolean = false ;
@@ -63,17 +62,18 @@ export class BrowsePanel
6362 this . browseItemPanel = this . createBrowseItemPanel ( ) ;
6463 }
6564
66- this . gridAndItemsSplitPanel = new SplitPanelBuilder ( this . selectableListBoxPanel , this . createBrowseWithItemsPanel ( ) )
67- . setAlignment ( SplitPanelAlignment . VERTICAL )
68- . setFirstPanelSize ( SplitPanelSize . PERCENTS ( this . getFirstPanelSize ( ) ) )
69- . build ( ) ;
70-
7165 if ( this . filterPanel ) {
72- this . gridAndToolbarPanel = new Panel ( ) ;
7366 this . filterAndGridSplitPanel = this . setupFilterPanel ( ) ;
7467 }
7568
69+ this . gridAndItemsSplitPanel =
70+ new SplitPanelBuilder ( this . filterAndGridSplitPanel ?? this . selectableListBoxPanel , this . createBrowseWithItemsPanel ( ) )
71+ . setAlignment ( SplitPanelAlignment . VERTICAL )
72+ . setFirstPanelSize ( SplitPanelSize . PERCENTS ( this . getFirstPanelSize ( ) ) )
73+ . build ( ) ;
74+
7675 this . selectableListBoxPanel . getWrapper ( ) . setSkipFirstClickOnFocus ( true ) ;
76+ this . hideFilterPanel ( ) ;
7777 }
7878
7979 protected initListeners ( ) {
@@ -189,36 +189,13 @@ export class BrowsePanel
189189 this . browseToolbar . addClass ( 'browse-toolbar' ) ;
190190 this . gridAndItemsSplitPanel . addClass ( 'content-grid-and-browse-split-panel' ) ;
191191
192- if ( this . filterPanel ) {
193- this . gridAndToolbarPanel . onAdded ( ( ) => {
194- this . gridAndItemsSplitPanel . setDoOffset ( true ) ;
195- } ) ;
196-
197- if ( this . filterPanelIsHiddenByDefault ) {
198- this . hideFilterPanel ( ) ;
199- }
200- this . appendChild ( this . filterAndGridSplitPanel ) ;
201-
202- // Hack: Places the append calls farther in the engine call stack.
203- // Prevent toolbar and gridPanel not being visible when the width/height
204- // is requested and elements resize/change position/etc.
192+ this . appendChild ( this . browseToolbar ) ;
193+ this . browseToolbar . onRendered ( ( ) => {
205194 setTimeout ( ( ) => {
206- this . gridAndToolbarPanel . appendChild ( this . browseToolbar ) ;
207- } ) ;
208- this . browseToolbar . onRendered ( ( ) => {
209- setTimeout ( ( ) => {
210- this . gridAndToolbarPanel . appendChild ( this . gridAndItemsSplitPanel ) ;
211- } ) ;
212- } ) ;
213- } else {
214- this . appendChild ( this . browseToolbar ) ;
215- // Hack: Same hack.
216- this . browseToolbar . onRendered ( ( ) => {
217- setTimeout ( ( ) => {
218- this . appendChild ( this . gridAndItemsSplitPanel ) ;
219- } ) ;
195+ this . appendChild ( this . gridAndItemsSplitPanel ) ;
220196 } ) ;
221- }
197+ } ) ;
198+
222199 return rendered ;
223200 } ) ;
224201 }
@@ -334,9 +311,9 @@ export class BrowsePanel
334311 }
335312
336313 private setupFilterPanel ( ) {
337- let splitPanel = new SplitPanelBuilder ( this . filterPanel , this . gridAndToolbarPanel )
338- . setFirstPanelMinSize ( SplitPanelSize . PIXELS ( 215 ) )
339- . setFirstPanelSize ( SplitPanelSize . PIXELS ( 215 ) )
314+ const splitPanel = new SplitPanelBuilder ( this . filterPanel , this . selectableListBoxPanel )
315+ . setFirstPanelMinSize ( SplitPanelSize . PIXELS ( 300 ) )
316+ . setFirstPanelSize ( SplitPanelSize . PIXELS ( 300 ) )
340317 . setAlignment ( SplitPanelAlignment . VERTICAL )
341318 . setAnimationDelay ( 100 ) // filter panel animation time
342319 . build ( ) ;
0 commit comments