(event: React.FocusEvent<HTMLInputElement>)
| 64 | } |
| 65 | // Adds the keyword when the input loses focus, if there's a keyword to add |
| 66 | const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => { |
| 67 | if (inputValue.trim() !== '' && event.relatedTarget?.tagName !== 'BUTTON') { |
| 68 | const newKeywords = [...keywords, inputValue.trim()] |
| 69 | setKeywords(newKeywords) |
| 70 | onKeywordsChange(newKeywords) |
| 71 | setInputValue('') |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // Removes a keyword from the list |
| 76 | const removeKeyword = (indexToRemove: number) => { |
no test coverage detected