Search code examples
extjsextjs6

ExtJS - Bring to front created panel on Viewport


Sorry for the newbie question, but I'm breaking my head.

Using the modern toolkit, I'm creating two panels directly in the viewport:

var clients = Ext.create('MyApp.view.clientsList', {fullscreen: true});
var providers = Ext.create('MyApp.view.providersList', {fullscreen: true});

How can I switch from one panel to other, because currently I can see only the last one created (providers)?

I tried with:

  • clients.show(); // without success
  • clients.bringToFront(); // error because isn't a floated panel

Maybe using z-index? Thanks a lot!!!


Solution

  • Just move clients and providers components to Ext.Carousel. Something like this:

    var carousel = Ext.create('Ext.Carousel', {
        fullscreen: true,
        items: [
            clients,
            providers
        ]
    });
    

    Fiddle sample