Skip to content

Instantly share code, notes, and snippets.

@maxkoretskyi
Created February 22, 2019 14:53
Show Gist options
  • Select an option

  • Save maxkoretskyi/04ddc40b253fd4e625328c910f721c98 to your computer and use it in GitHub Desktop.

Select an option

Save maxkoretskyi/04ddc40b253fd4e625328c910f721c98 to your computer and use it in GitHub Desktop.
let gridOptions = {
suppressKeyboardEvent: function(params) {
const KEY_LEFT = 37;
const KEY_UP = 38;
const KEY_RIGHT = 39;
const KEY_DOWN = 40;
const event = params.event;
const key = event.which;
const keysToSuppress = [KEY_LEFT, KEY_UP, KEY_RIGHT, KEY_DOWN];
const suppress = keysToSuppress.indexOf(key) >= 0;
return suppress;
},
...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment