Results 1 to 2 of 2

Thread: Responsive Config/SetMenu

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2016
    Posts
    4

    Default Responsive Config/SetMenu

    Is it possible to set the side that the menu comes in on based on the viewport's width?

    Code:
            
    Ext.Viewport.setMenu(menu, {    side: 'left',
        reveal: true
     });
    But I would like to do something like this:

    Code:
        responsiveConfig: {
            'width < 768': {
                menu: menu, {
                    side: 'right',
                    reveal: true
                }
            },
            'width >= 768': {
                menu: menu, {
                    side: 'left',
                    reveal: true
                }
            }
        },
    Obviously that doesn't work, but I'm simply trying to put the menu on the right side on small screens, and on the left on large screens.

    Thanks.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    For a config to be available for responsive design, it must have a setter method. Here's a blog post that explains it in more detail.
    https://www.sencha.com/blog/designin...s-with-ext-js/

    See the "Which Configs Can Be Responsive?" and "Making Classes Responsive" sections.

Similar Threads

  1. responsive config problem
    By Buyakia in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 14 Mar 2016, 6:35 AM
  2. Responsive config issue
    By kkn in forum Ext 5: Q&A
    Replies: 5
    Last Post: 22 Jul 2015, 3:41 PM
  3. Set columnWidth in responsive config
    By jineeshmg in forum Ext 5: Q&A
    Replies: 1
    Last Post: 4 Dec 2014, 12:10 PM
  4. [FIXED] Responsive Config issue with viewport in ASP.NET
    By Max01001111 in forum Ext 5: Bugs
    Replies: 1
    Last Post: 7 Jul 2014, 4:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •