Skip to content

Commit

Permalink
fix: #532
Browse files Browse the repository at this point in the history
  • Loading branch information
m2a2x committed Aug 19, 2024
1 parent c8cc4b3 commit e661c69
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
changelog:
exclude:
# A list of labels that exclude a pull request from appearing in release notes.
labels:
- ignore-for-release
authors:
- octocat
categories:
- title: Breaking Changes 🛠
labels:
- Semver-Major
- breaking-change
- title: Exciting New Features 🎉
labels:
- Semver-Minor
- feature
- title: Other Changes
labels:
- '*'
footer: |
### Revogrid:
- ⭐ [Star the Revogrid Repo](https://github.com/revolist/revogrid)
- 🐦 [Follow at Twitter](https://x.com/revolist_ou/)
- 🔗 [Follow at LinkedIn](https://www.linkedin.com/company/revolist)
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 190 files
10 changes: 2 additions & 8 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,7 @@ declare global {
"afteredit": AfterEditEvent;
"beforeautofill": ChangedRange;
"beforerange": ChangedRange;
"afterfocus": {
model: any;
column: ColumnRegular;
};
"afterfocus": FocusAfterRenderEvent;
"roworderchanged": { from: number; to: number };
"beforesortingapply": {
column: ColumnRegular;
Expand Down Expand Up @@ -1317,10 +1314,7 @@ declare namespace LocalJSX {
/**
* Triggered after focus render finished. Can be used to access a focus element through `event.target`. This is just a duplicate of `afterfocus` from `revogr-focus.tsx`.
*/
"onAfterfocus"?: (event: RevoGridCustomEvent<{
model: any;
column: ColumnRegular;
}>) => void;
"onAfterfocus"?: (event: RevoGridCustomEvent<FocusAfterRenderEvent>) => void;
/**
* Emmited after the grid is initialized. Connected to the DOM.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/components/overlay/keyboard.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
isCopy,
isCut,
isEnterKeyValue,
isLetterKey,
isPaste,
isTab,
} from '../../utils/key.utils';
Expand Down Expand Up @@ -117,7 +116,7 @@ export class KeyboardService {
}

// pressed letter key
if (isLetterKey(e.keyCode)) {
if (e.key.length === 1) {
this.sv.change(e.key);
return;
}
Expand Down
11 changes: 0 additions & 11 deletions src/utils/key.utils.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import KeyCodesEnum, { codesLetter, keyValues } from './key.codes';
import OsPlatform from './platform';

export function isLetterKey(code: number): boolean {
return (
code === 32 || // space
(code >= 48 && code <= 57) ||
(code >= 96 && code <= 111) ||
(code >= 186 && code <= 192) ||
(code >= 219 && code <= 222) ||
code >= 226 ||
(code >= 65 && code <= 90)
); // a-z
}

export function isMetaKey(code: number): boolean {
const keys: KeyCodesEnum[] = [
Expand Down

0 comments on commit e661c69

Please sign in to comment.