You found a bug! We've classified it as
EXTJS-6670
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
17 Oct 2012, 11:45 PM
#11
NOTICE : I've changed all my code in order to delete the dataview and recreated it with the loaded store in it. This works cause the store is not reload after the dataview call.
Not the best but efficient with the selector.
NOTICE 2 : DragSelector and Draggable seems not to work together.
-
Apologize for the delay.
Unfortunately, I have no idea. If you could provide a runnable (copy, paste and run) sample to reproduce, I would look and, as well, it would be very helpful for ExtJS team. Please simplify a sample as much as you can removing any not relevant things.
-
Sencha User
New version
Hi!
I stumbled upon this old bug with dragselector and it seems that your fid doesn't work in the new Ext JS. Do you have any idea how this could be solved in the new version?
EDIT: ok, I just added Daniil's fix code to "onStart" property in DragSelector.js and it works nicely. :_)
-
Ext JS Premium Member
I don't know if this ever got fixed in later versions of ExtJS (we're using 4.2), but this is my cleanest solution.
The problem is that the proxy element is created inside the dataview. Then, when a refresh occurs, the proxy element is destroyed. If it is created outside, then refreshing will not affect it.
Create a new class and override the getProxy() function:
Code:
Ext.define('MYAPP.ux.DataView.DragSelector', {
extend: 'Ext.ux.DataView.DragSelector',
getProxy: function() {
if (!this.proxy) {
this.proxy = this.dataview.getEl().insertSibling({
tag: 'div',
cls: 'x-view-selector'
}, "after");
}
return this.proxy;
}
});
Then use this class instead of Ext.ux.DataView.DragSelector.