Results 1 to 5 of 5

Thread: [CLASSIC] BUG CLICK LAST COLUMN MENU

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    372

    Default [CLASSIC] BUG CLICK LAST COLUMN MENU

    Please consider this fiddle.
    With version 6.7 clicking on the menu of the last column the program breaks down.


    It works with 6.6


    thank you so much


    https://fiddle.sencha.com/#view/editor&fiddle/2q1m

  2. #2
    Sencha Premium Member
    Join Date
    Dec 2015
    Posts
    14

    Default

    looks like there is a problem with the showMenuBy function.

    6.6:
    groupMenuMeth = header.groupable === false || !header.dataIndex || me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable',

    6.7:
    groupMenuMeth = header.groupable === false || !header.dataIndex || (me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable'),

    this means that if the 'groupable' property on the grid column is set to false this will cause an exception a few lines down.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    372

    Default

    Quote Originally Posted by drhalloran View Post
    looks like there is a problem with the showMenuBy function.

    6.6:
    groupMenuMeth = header.groupable === false || !header.dataIndex || me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable',

    6.7:
    groupMenuMeth = header.groupable === false || !header.dataIndex || (me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable'),

    this means that if the 'groupable' property on the grid column is set to false this will cause an exception a few lines down.
    I would love to know the reason for certain changes.


    For example I noticed that now all the variables are declared at the head of the functions.
    They were first declared as they were needed.

  4. #4
    Sencha Premium User
    Join Date
    Jan 2009
    Posts
    453

    Default

    I noticed many small changes like this as well. My guess is they ran the code through some sort of linter and applied the minor suggestions it offered.

    Regarding the variable declarations, in JavaScript variables declared with var have scope for the entire function regardless of where they were declared in the function - https://www.w3schools.com/js/js_hoisting.asp

    It's just speculation, but maybe they were trying to understand the codebase and thought that it would be more clear to declare them at the top of the scope since this is how hoisting will treat them anyway.

    Quote Originally Posted by wki01 View Post
    I would love to know the reason for certain changes.


    For example I noticed that now all the variables are declared at the head of the functions.
    They were first declared as they were needed.

  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2008
    Posts
    372

    Default

    Quote Originally Posted by drhalloran View Post
    looks like there is a problem with the showMenuBy function.

    6.6:
    groupMenuMeth = header.groupable === false || !header.dataIndex || me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable',

    6.7:
    groupMenuMeth = header.groupable === false || !header.dataIndex || (me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable'),

    this means that if the 'groupable' property on the grid column is set to false this will cause an exception a few lines down.

    6.7 (6.7.161)
    groupMenuMeth = header.groupable === false || !header.dataIndex || (me.view.headerCt.getVisibleGridColumns().length < 2 ? 'disable' : 'enable'),

    6.7.212
    groupMenuMethod = (header.groupable === false || !header.dataIndex || (me.view.headerCt.getVisibleGridColumns().length < 2)) ? 'disable' : 'enable',

Posting Permissions

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