gpt4 book ai didi

javascript - 如何避免在使用单元格编辑的 ExtJS 网格上按两次保存按钮

转载 作者:行者123 更新时间:2023-11-30 12:43:32 26 4
gpt4 key购买 nike

当使用 ExtJS 网格进行单元格编辑时,可能会出现必须单击按钮两次的问题,因为编辑器(文本字段)的模糊事件首先被调用,然后第一个按钮单击事件由于某种原因不再可访问.在这种情况下,如何避免按两次(保存)按钮?

最佳答案

为了避免使用其他答案出现的一些错误,我将我需要的内容提取到它自己的 xtype 中,如下所示:

Ext.define('Predictive.view.ParamGridSaveButton', {
extend: 'Ext.button.Button',
alias: 'widget.paramGridSaveButton',

onMouseDown: function() {
Predictive.eventBus.fireEvent('dropdownSaveClicked', this);
this.callParent(arguments);
}
});

关于javascript - 如何避免在使用单元格编辑的 ExtJS 网格上按两次保存按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23504280/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com