Skip to content

Commit

Permalink
Merge branch 'master' into GH-68
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepika516 authored Feb 29, 2024
2 parents 9639168 + 6a4dad7 commit 67eeb69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
(mousedown)="handleMouseDown($event)"
(mouseup)="handleMouseUp()"
(mouseleave)="handleMouseLeave($event)"
(keydown)="handleKeyPress($event)"
/>
</div>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,16 @@ export class GroupComponent<E> implements OnInit, AfterViewInit {
}
}

handleKeyPress(event: any) {
const keyCode = event.which || event.keyCode;
const isDigit = keyCode >= 48 && keyCode <= 57;
const isBackspaceOrDelete = [8, 46].includes(keyCode);
const inputValue = event.target.value;
const isValidInput = /^-?\d*\.?\d*$/.test(inputValue);
if (!(isDigit || isBackspaceOrDelete) || !isValidInput) {
event.preventDefault();
}
}
handleEnterEvent(
callback: any,
node: BpmnNode,
Expand Down
1 change: 1 addition & 0 deletions projects/workflows-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
"directory": "dist"
},
"hash": "52e16f7339ae099b920d5eba85c8551b9ac2178d0fdb8c34eb6eb6de8aa96685"

}

0 comments on commit 67eeb69

Please sign in to comment.