Skip to content

Commit

Permalink
Add validation on keyup for tag component in submission form
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorHugoDuranS committed Jun 7, 2024
1 parent 1c3bf4d commit 58c21e7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implemen
* @param event the keyUp event
*/
onKeyUp(event) {
if (event.keyCode === 13 || event.keyCode === 188) {
if (event.keyCode === 13 || (event.key.includes(',') && event.keyCode === 188) || ((event.key as string).includes(';') && event.keyCode === 186) ) {
event.preventDefault();
// Key: 'Enter' or ',' or ';'
this.addTagsToChips();
Expand Down

0 comments on commit 58c21e7

Please sign in to comment.