[英]AngularJS ui-select multiple, forbid backspace key to delete item
I have an AngularJS multiple ui-select control. 我有一个AngularJS多个ui选择控件。 I need to prevent the backspace key to delete selected items (tags).
我需要防止使用Backspace键删除选定的项目(标签)。 This is a jsfiddle found on SO while searching about this: http://fiddle.jshell.net/v1df0erv/
这是在搜索此内容时在SO上找到的jsfiddle: http ://fiddle.jshell.net/v1df0erv/
It mostly describes what I have. 它主要描述了我所拥有的。 But once tags are added, I need to not allow the backspace key to delete them.
但是,一旦添加了标签,就无需让Backspace键将其删除。
Thanks. 谢谢。
Use ui-lock-choice="true" on ui-select-match element. 在ui-select-match元素上使用ui-lock-choice =“ true”。 like explained here: https://github.com/angular-ui/ui-select/wiki/ui-select-match
就像这里解释的那样: https : //github.com/angular-ui/ui-select/wiki/ui-select-match
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.