PDA

View Full Version : [CLOSED] sort wrongly enabled on column action



touchy
18 Jan 2014, 10:40 AM
Seeing sort wrongly enabled on column action in Ext JS 4.2.2.

Possible cause in class Ext.panel.Table function initComponent does an Ext.apply(headerCtCfg with a sortable: me.sortableColumns, overwriting the sortable false with the sortableColumns true.

A workaround is for your Ext.gird.column.Action to have a listener beforerender do a component.sortable = false to fix the wrongly set sortable.

Similar to http://www.sencha.com/forum/showthread.php?261412 but occurs even without summary.

Gary Schlosberg
18 Jan 2014, 1:49 PM
Thanks for the report. Can you please post a runnable test case which reproduces the issue?
https://fiddle.sencha.com/#home

touchy
18 Jan 2014, 6:44 PM
One more note: I am using Sencha Architect 3.0.2. That means when I switch off sortable then there is nothing in the config, not even false.

That may or may not have been that way in earlier versions of Sencha Architect.

Still, the documentation of Ext.gird.column.Action says sortable defaults to false.

The implementation of Ext.gird.column.Action sets sortable to false, but doesn't protect it from being changed.

And Ext.panel.Table function initComponent does Ext.apply, which means it would overwrite it.

This has the appearence of a defect, but I use the workaround I have described. Hence it isn't important enough for me to make a separate sample. I would start with Examples Basic Array Grid http://docs-origin.sencha.com/extjs/4.2.2/#!/example/build/KitchenSink/ext-theme-neptune/#array-grid to reproduce, but you'd have to make sure to remove the menuDisabled:true from that example.

touchy
18 Jan 2014, 7:27 PM
That was easy enough making a Fiddle: https://fiddle.sencha.com/#fiddle/2pf

So, in Ext JS 4.2.1 per Fiddle if one would explicitly set sortable:false it still shows the menu, but the items are disabled.

But, Sencha Architect 3.0.2 doesn't let me explicitly set sortable:false, it thinks that's the default and in effect when I switch it off just doesn't put a sortable into the config. That's both when I click the checkbox or the clear button.

Such a small defect, so many words and actions to investigate it. Let's solve bigger problems. But here it is, described, and with workaround.

Gary Schlosberg
11 Feb 2014, 8:58 PM
Thanks for the report! I have opened a bug in our bug tracker.

Gary Schlosberg
11 Feb 2014, 9:02 PM
I filed the ExtJS bug, but I'm surprised that you are having this trouble with Architect, since it appears that this issue was fixed for 3.0:
http://www.sencha.com/forum/showthread.php?259993

morgoth.evil
22 Sep 2014, 10:56 PM
The same problem in Sencha Architect 3.0.4.1386.