ソースを参照

Onsearch event is not fire when we press the arrows keys

Dennis Hernández 9 年 前
コミット
3ea29d7958
1 ファイル変更6 行追加1 行削除
  1. 6 1
      src/bootstrap-table.js

+ 6 - 1
src/bootstrap-table.js

@@ -1175,6 +1175,10 @@
                     }
                     }
                 }
                 }
 
 
+                if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) {
+                    return;
+                }
+
                 clearTimeout(timeoutId); // doesn't matter if it's 0
                 clearTimeout(timeoutId); // doesn't matter if it's 0
                 timeoutId = setTimeout(function () {
                 timeoutId = setTimeout(function () {
                     that.onSearch(event);
                     that.onSearch(event);
@@ -2972,7 +2976,8 @@
         compareObjects: compareObjects,
         compareObjects: compareObjects,
         calculateObjectValue: calculateObjectValue,
         calculateObjectValue: calculateObjectValue,
         getItemField: getItemField,
         getItemField: getItemField,
-        objectKeys: objectKeys
+        objectKeys: objectKeys,
+        isIEBrowser: isIEBrowser
     };
     };
 
 
     // BOOTSTRAP TABLE INIT
     // BOOTSTRAP TABLE INIT