AngularJS(ng-grid)“editableCellTemplate"失去焦点时仍处于编辑模式 [英] AngularJS (ng-grid) "editableCellTemplate" remains in edit mode on loss of focus
本文介绍了AngularJS(ng-grid)“editableCellTemplate"失去焦点时仍处于编辑模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在最新版本的 ng-grid(v2.0.7) 中,当一个 editableCellTemplate 处于编辑模式并且失去焦点时,它仍然处于编辑模式.这是错误还是我错误地配置了网格?
In the latest version of ng-grid(v2.0.7), when a editableCellTemplate is in edit mode and loses focus, it remain in edit mode. Is this a bug or did I configure the grid incorrectly?
示例如下:http://plnkr.co/edit/OgEjk7wFaC982FrKbeHH?p=preview 其中第 0 列包含 editableCellTemplate.
Here's an example: http://plnkr.co/edit/OgEjk7wFaC982FrKbeHH?p=preview where column 0 contains the editableCellTemplate.
推荐答案
我在 ng-grid.js 中的一个模板中找到了答案.我错过了 ng-input="COL_FIELD"
I found the answer in one of the templates inside of ng-grid.js. I was missing ng-input="COL_FIELD"
<select ng-cell-input ng-class="'colt' + $index" ng-input="COL_FIELD" ng-model="COL_FIELD">
<option>nl</option>
<option>fr</option>
<option>en</option>
</select>
这篇关于AngularJS(ng-grid)“editableCellTemplate"失去焦点时仍处于编辑模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文