dspace-angular
dspace-angular copied to clipboard
Fixes Incorrect operation of the keyword selection field with < and , on the Submission page
Hi @tdonohue , I'm @jtimal partner, I like to share this PR with you:
References
- Fixes #2679
Description
I changed the current validation for tag component in on keyup function for validate the keys "ENTER", "," and ";" for add the tags to Chips template.
Instructions for Reviewers
I added validation for the keys "," and ";" add the labels to the chip template because the current functionality splits the value using the keys mentioned above so I think it is the correct way to validate as it causes an error if we don't validate by those keys incorrectly separating those values, i attach an example:
https://github.com/DSpace/dspace-angular/assets/25066032/46a8b86d-aac2-40a0-839e-c9dced1451ad
With validation I simplified the separation of values.
List of changes in this PR:
- Change the validation considering the keys "," and ";" using the properties keyCode and key of the keyup event
To review and check: Create a new item or edit item Enter a keyword with the symbol , or <
Checklist
- [x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
- [x] My PR passes ESLint validation using
yarn lint - [x] My PR doesn't introduce circular dependencies (verified via
yarn check-circ-deps) - [ ] My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
- [x] My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
- [ ] If my PR includes new libraries/dependencies (in
package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation. - [ ] If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
- [x] If my PR fixes an issue ticket, I've linked them together.