You found a bug! We've classified it as
EXTJS-27330
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha Premium User
[6.6.0 Classic] down ( [selector] ) method doesn't work?
it worked normally in 6.5.3.when I upgrade my app to 6.6.0, there will be an error .As follows:
IB0%[3]86B0U[[P@QPWA@VM.jpg
But when I use the Ext.ComponentManager.get('id') method, it can get the component normally .
-
Sencha Premium User
-
You need to post more code. What is "candidate" at that point?
Twitter - @evantrimboli
Former Sencha framework engineer, available for consulting.
As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.
-
Sencha Premium User
Hi evant,
this error happened when I used ComponentQuery.js.
Whether I used " down "or "query" to get the component.
There will be this error in ComponentQuery.js.
$O(}QJYXG291O}PZCC5T{H9.png
-
Sencha Premium User
code:
Ext.define('Demo.view.dashboard', {
extend: 'Ext.panel.Panel',
alias: 'widget.demo',
requires: [
'Ext.chart.theme.Category2',
'Ext.chart.CartesianChart',
'Ext.chart.series.Line',
'Ext.chart.axis.Numeric',
'Ext.ComponentManager',
'dashboard.DemoStore'
],
items: [{
xtype: 'cartesian',
store: {type: 'dashboard.DemoStore'},
......
......
}],
reloadStore: function() {
this.down('cartesian').store.load(); //there will be an error
}
}
-
Sencha User
I encountered this problem in the same place in EXTJS 6.6.Look for chart in a panel with the "down” method, and the "isXType is not function" error appears in the filterByXType method. It seems that the sub-component "Sprite legend" in chart does not have this method.
-
Sencha Premium User
-
Sencha User
Providing ways to reproduce the example is always better. Here, somebody else already made a fiddle for this issue, seems it hit everyone pretty quickly:
To reproduce the issue, click the (tiny) "Test" button in the bottom-right corner of the example. Its command is never executed (which is just give the text field a value).
And in order for the issue not to be triggered, all you need to do is implement Ext.chart.legend.SpriteLegend.isXType() method returning `false`, always (as the class does not have an XType anyway).
For some reason, people decided the spritelegend component should be within the list of items within a chart base container. But forgot to make it comply with the rest of the framework. 
Here's a fiddle based on the above, implementing the fix (via, well, another hideous, bottom-right tiny "fix" button).
The example itself is very overcomplicated. All that's needed is a panel with a chart inside, using that sprite legend. Then any .down() query within the panel's scope would trigger the issue. But well, it was the best, given somebody already taken the time to write a runnable fiddle to reproduce the issue, although not very straightforward, with the instructions above it should be easy for everybody to reproduce it.
-
Sencha Premium User
Looks like we're in this boat as well. We've recently upgraded to ExtJS 6.6 and are seeing this intermittently in our modern app. It kills the whole app when this happens; this is a pretty critical issue!
-
Sencha - Support Team
This looks like an issue which has been reported when using sprite legends in charts. A temporary work around is to set your legend to type dom :
Code:
legend: {
docked: 'bottom',
type: 'dom'
}