mirror of
https://github.com/koalyptus/TableFilter.git
synced 2026-03-17 08:05:44 +01:00
Fix ezEditTable enter key hijaking
This commit is contained in:
parent
82132308ae
commit
73b8dbcdae
6 changed files with 38 additions and 31 deletions
|
|
@ -66,8 +66,7 @@ export default class AdapterEzEditTable {
|
|||
|
||||
cfg.base_path = cfg.base_path || tf.basePath + 'ezEditTable/';
|
||||
var editable = cfg.editable;
|
||||
var selectable = cfg.selectable;
|
||||
cfg.selection = selectable;
|
||||
var selectable = cfg.selection;
|
||||
|
||||
if(selectable){
|
||||
cfg.default_selection = cfg.default_selection || 'row';
|
||||
|
|
@ -348,7 +347,7 @@ export default class AdapterEzEditTable {
|
|||
reset(){
|
||||
var ezEditTable = this._ezEditTable;
|
||||
if(ezEditTable){
|
||||
if(this.cfg.selectable){
|
||||
if(this.cfg.selection){
|
||||
ezEditTable.Selection.Set();
|
||||
}
|
||||
if(this.cfg.editable){
|
||||
|
|
@ -363,7 +362,7 @@ export default class AdapterEzEditTable {
|
|||
destroy(){
|
||||
var ezEditTable = this._ezEditTable;
|
||||
if(ezEditTable){
|
||||
if(this.cfg.selectable){
|
||||
if(this.cfg.selection){
|
||||
ezEditTable.Selection.ClearSelections();
|
||||
ezEditTable.Selection.Remove();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -523,14 +523,18 @@ export class TableFilter{
|
|||
this.isUserTyping = false;
|
||||
global.clearInterval(this.autoFilterTimer);
|
||||
}
|
||||
// if(o.ezEditTable){
|
||||
// if(o.editable){
|
||||
// o.ezEditTable.Editable.Set();
|
||||
// }
|
||||
// if(o.selectable){
|
||||
// o.ezEditTable.Selection.Set();
|
||||
// }
|
||||
// }
|
||||
// TODO: hack to prevent ezEditTable enter key event hijaking.
|
||||
// Needs to be fixed in the vendor's library
|
||||
if(this.hasExtension('advancedGrid')){
|
||||
var advGrid = this.extension('advancedGrid');
|
||||
var ezEditTable = advGrid._ezEditTable;
|
||||
if(advGrid.cfg.editable){
|
||||
ezEditTable.Editable.Set();
|
||||
}
|
||||
if(advGrid.cfg.selection){
|
||||
ezEditTable.Selection.Set();
|
||||
}
|
||||
}
|
||||
},
|
||||
// set focused text-box filter as active
|
||||
onInpFocus(e) {
|
||||
|
|
@ -542,14 +546,18 @@ export class TableFilter{
|
|||
Event.cancel(_ev);
|
||||
Event.stop(_ev);
|
||||
}
|
||||
// if(o.ezEditTable){
|
||||
// if(o.editable){
|
||||
// o.ezEditTable.Editable.Remove();
|
||||
// }
|
||||
// if(o.selectable){
|
||||
// o.ezEditTable.Selection.Remove();
|
||||
// }
|
||||
// }
|
||||
// TODO: hack to prevent ezEditTable enter key event hijaking.
|
||||
// Needs to be fixed in the vendor's library
|
||||
if(this.hasExtension('advancedGrid')){
|
||||
var advGrid = this.extension('advancedGrid');
|
||||
var ezEditTable = advGrid._ezEditTable;
|
||||
if(advGrid.cfg.editable){
|
||||
ezEditTable.Editable.Remove();
|
||||
}
|
||||
if(advGrid.cfg.selection){
|
||||
ezEditTable.Selection.Remove();
|
||||
}
|
||||
}
|
||||
},
|
||||
// set focused drop-down filter as active
|
||||
onSlcFocus(e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue