react-tabulator icon indicating copy to clipboard operation
react-tabulator copied to clipboard

keybinding option type is incorrect

Open elliotmr opened this issue 6 years ago • 1 comments

keybinding option type is incorrect

  • bug: see title

Short Description: Tabulator expects on object as the "keybinding option" but the type in ConfigUtils.tsx is set to an array. This causes a type error when setting a valid keybinding override object.

https://github.com/ngduc/react-tabulator/blob/58b211a4f09fcb3929c34542a421a735ad4edd3b/src/ConfigUtils.tsx#L26

DefinitelyTyped has the following definition for the keybindings object"

interface KeyBinding { navPrev?: string | boolean; navNext?: string | boolean; navLeft?: string | boolean; navRight?: string | boolean; navUp?: string | boolean; navDown?: string | boolean; undo?: string | boolean; redo?: string | boolean; scrollPageUp?: string | boolean; scrollPageDown?: string | boolean; scrollToStart?: string | boolean; scrollToEnd?: string | boolean; copyToClipboard?: string | boolean; }

I will try to put together a pull request if I get a chance in the next few days. Would you rather a generic object or putting the entire KeyBinding type information in?

elliotmr avatar Dec 25 '19 02:12 elliotmr

generic object is fine. thanks for opening a PR!

ngduc avatar Dec 26 '19 03:12 ngduc