ab6310c278
* implement `backspace` behaviour in tests * add `Delete` Key * implement `nullable` mode on Combobox in single value mode If you pass a `nullable` prop to the Combobox, then it's possible to unset the Combobox value by setting it to `null`. This is triggered by removing all text from the input which will reset the value itself as well. * update changelog
23 lines
454 B
TypeScript
23 lines
454 B
TypeScript
// TODO: This must already exist somewhere, right? 🤔
|
|
// Ref: https://www.w3.org/TR/uievents-key/#named-key-attribute-values
|
|
export enum Keys {
|
|
Space = ' ',
|
|
Enter = 'Enter',
|
|
Escape = 'Escape',
|
|
Backspace = 'Backspace',
|
|
Delete = 'Delete',
|
|
|
|
ArrowLeft = 'ArrowLeft',
|
|
ArrowUp = 'ArrowUp',
|
|
ArrowRight = 'ArrowRight',
|
|
ArrowDown = 'ArrowDown',
|
|
|
|
Home = 'Home',
|
|
End = 'End',
|
|
|
|
PageUp = 'PageUp',
|
|
PageDown = 'PageDown',
|
|
|
|
Tab = 'Tab',
|
|
}
|