我有一個輸入文本框綁定到knockout js觀察。處理IE 9&10的清除按鈕與敲除綁定
<input id="searchTextBox" class="searchTextBox" type="text" maxlength="25"
title="Search" placeholder="Search"
data-bind="value: GridVm.FilterText,
valueUpdate: 'afterkeydown',
disable: GridVm.Data().length == 0" />
的問題是,當用戶點擊在x在IE中可觀察到的FilterText不更新。
我發現我可以remove the x(見鏈接的問題截屏),但是這是一個不得已的(我喜歡的功能)。 This forum says there is no event fired when the x is clicked。
是否有一個事件可以用來強制Knockout可觀察更新或在Knockout中執行此操作的好方法?
嘗試點擊綁定 – CodeThug 2013-05-07 20:13:06