問題描述
如何在 NumericTextbox Kendo UI 滾動條中觸發自動保存 (How to trigger autosave in a NumericTextbox Kendo UI Scrollbars)
我想知道如何在 Kendo 數字文本框中進行自動保存。
我創建了一個小演示,我可以使用普通輸入文本進行自動保存,(失去焦點或 2 秒時自動保存不輸入值),然後我添加了一個 Kendo UI 數字文本框,當我輸入一些值或失去焦點時也可以使用,但是當我更改滾動條中的值時,自動保存不起作用。
設定值
<輸入劍道數字文本框 ng‑model="item.value" style="width: 100%;" 需要/>
< 參考解法
方法 1:
Kendo's NumericTextBox does not update the model on the Spin event (the event you are referring to, which fires when you press the up/down arrows).
I encountered the same, annoyed that ng‑model was only updated on Blur. My fix was to trigger the Change event on Spin >> Updated Plunker
<input
kendo‑numeric‑text‑box="myNumeric"
k‑on‑spin="myNumeric.trigger('change')"
ng‑model="item.value" />
The Kendo docs offer a slightly different approach.
(by jolynice、What‑About‑Bob)