🔧 chore(reactflowUtils.ts): remove console.log statement for keydown event in handleKeyDown function

🐛 fix(reactflowUtils.ts): fix handleKeyDown function to properly handle special characters and backspace key
This commit is contained in:
Cristhian Zanforlin Lousa 2023-08-14 15:58:26 -03:00
commit a531cc6066

View file

@ -236,7 +236,8 @@ export function addVersionToDuplicates(flow: FlowType, flows: FlowType[]) {
export function handleKeyDown(e: React.KeyboardEvent<HTMLInputElement>, inputValue: string | string[] | null, block: string)
{
console.log("check key: ", e);
if (typeof inputValue === "string" && e.ctrlKey && e.key === "Backspace" &&
(inputValue === block || inputValue?.charAt(inputValue?.length - 1) === ' '
|| specialCharsRegex.test(inputValue?.charAt(inputValue?.length - 1))