Skip to content

Commit 673994f

Browse files
fix: better input handler
1 parent 6c7d4dc commit 673994f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/edit-pane.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default function EditPane({
9090
colSpan,
9191
original: match[0],
9292
defaultValue,
93-
currentValue: valueToKeep,
93+
currentValue: valueToKeep.replace(/\s+/g, " "),
9494
});
9595
}
9696
}
@@ -216,7 +216,7 @@ export default function EditPane({
216216
const commonProps = {
217217
id: `input-${i}`,
218218
placeholder: item.defaultValue.replace(/\s+/g, " "),
219-
value: item.currentValue.replace(/\s+/g, " "),
219+
value: item.currentValue,
220220
onChange: (e: React.ChangeEvent<AcceptElements>) =>
221221
handleInputChange(i, e.target.value),
222222
onKeyDown: (e: React.KeyboardEvent<AcceptElements>) =>

0 commit comments

Comments
 (0)