Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha Premium User
[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
-
Sencha Premium Member
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.
-
Sencha Premium User

Originally Posted by
drhalloran
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.
-
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.

Originally Posted by
wki01
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.
-
Sencha Premium User

Originally Posted by
drhalloran
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',