修改后的 InlineEditBox 意外触发 onChange 事件
按照此线程:将 dijit.InlineEditBox 与 dijit.form.Select 结合使用我一直在使用 InlineEditBox 的“固定版本”,可以在下面的小提琴中看到。
http://jsfiddle.net/mimercha/Vuet8/16/
“FixedInlineEditBox”dijit初始化时触发“onChange”事件。我正在尝试将 InlineEditBox 与 Ajax 事件结合使用,并且页面上一次最多可以有 300 个内联编辑框,因此我试图了解什么触发了 FixInlineEditBox 中未触发的“onChange”事件从原始 InlineEditBox 初始化:
http://jsfiddle.net/mimercha/5HUga/1/
任何有关如何在初始化期间保存显示值而不触发 onChange 的建议都很棒!
Following this thread: Using dijit.InlineEditBox with dijit.form.Select I've been using a "fixed version" of InlineEditBox that can be seen in the fiddle below.
http://jsfiddle.net/mimercha/Vuet8/16/
The "FixedInlineEditBox" dijit triggers the "onChange" event when initialized. I'm trying to use the InlineEditBox with Ajax event and can have up to 300 inline edit boxes on the page at a time, so I'm trying to understand what is triggered the "onChange" event in FixedInlineEditBox that wasn't triggered on initialization from the original InlineEditBox:
http://jsfiddle.net/mimercha/5HUga/1/
Any suggestions on how to save the displayedValue during initialization without triggering onChange would be great!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是因为我在之前的修改中从
startup
调用了save
方法,而没有进一步更改save
,这样它就不会总是调用onChange
。不幸的是,如果不完全覆盖该方法,这是不容易实现的...http://jsfiddle.net/ kfranqueiro/Vuet8/18/
This was due to my calling the
save
method fromstartup
in the previous modification without further alteringsave
so that it wouldn't always callonChange
. Unfortunately, this isn't easily possible without completely overwriting the method...http://jsfiddle.net/kfranqueiro/Vuet8/18/