Explorar o código

combogrid 允许自行输入

zhangzaipeng %!s(int64=3) %!d(string=hai) anos
pai
achega
a429589741
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      src/controls/input/combogrid.js

+ 7 - 3
src/controls/input/combogrid.js

@@ -35,6 +35,7 @@ export default function () {
 
         editable: true,
         _superBlur: false,
+        allowCustomInput: false,
 
         initComponent() {
             const that = this
@@ -87,8 +88,11 @@ export default function () {
                                 that.onTriggerClick(that, that.getPickerTrigger(), e);
                                 return
                             }
-                            // 取消 keyup 事件,让 ext 不要吧当前输入的值记录到 value 中
-                            stopEvent(e)
+
+                            if(!that.allowCustomInput) {
+                                // 取消 keyup 事件,让 ext 不要吧当前输入的值记录到 value 中
+                                stopEvent(e)
+                            }
                         })
                         $dom.on('change', e => {
                             if (that.isExpanded) {
@@ -403,4 +407,4 @@ export default function () {
         }
     });
 
-}
+}