如何让FancyGrid中的onChange正常工作?

问题描述 投票:0回答:1

我正在使用 Fancy Grid,当此单元格中发生一些更改或更新时,我想在调试器中看到它,我已将调试器放入函数中,当我进行任何更改时,它不会在此函数中暂停,也不会在控制台中打印任何内容。请找到以下代码:

  {
                    index: 'fieldLength',
                    editable: editableLength,
                    title: 'Field Length',
                    flex: 1,
                    headerCls: 'header-cell-without-search-input',
                    filter:{
                        header:true
                    },
                    type: 'number',
                    vtype: {
                        before: ['notempty', 'notnan'],
                        type: 'min',
                        param: 0
                    },
                    events: [{
                        onchange : function (g,o) {
                            debugger
                            console.log("SOmething changed!!")
                        }
                    }]
                }

这里正确的解决方案是什么?

我尝试了很多方法,例如 before|after 、 update 、 save 但仍然没有找到合适的解决方案。

javascript grid gsp
1个回答
0
投票

我认为您正在寻找的是

change
事件。据我所知,FancyGrid 没有
onChange
事件。作为参考,请参阅此处

您的活动应如下所示:

events: [{
    change: function (g,o) {
         debugger
         console.log("SOmething changed!!")
    }
}]
© www.soinside.com 2019 - 2024. All rights reserved.