fix: long text to single text paste

This commit is contained in:
mertmit
2023-10-05 18:20:37 +00:00
parent 54a48e6490
commit a7a634fd40
2 changed files with 10 additions and 2 deletions

View File

@@ -17,6 +17,14 @@ export default function convertCellData(
if (value === '') return null
switch (to) {
case UITypes.SingleLineText:
case UITypes.LongText:
// This is to remove the quotes added from LongText
// TODO (refactor): remove this when we have a better way to handle this
if (value.match(/^".*"$/)) {
return value.slice(1, -1)
}
return value
case UITypes.Number: {
const parsedNumber = Number(value)
if (isNaN(parsedNumber)) {