handle paste for UITypes JSON

This commit is contained in:
Fendy Heryanto
2025-02-17 04:40:22 +00:00
parent 6e3e2494a4
commit fe372ed83e

View File

@@ -307,6 +307,14 @@ export default function convertCellData(
throw new Error(`Unsupported conversion for ${to}`)
}
}
case UITypes.JSON: {
try {
JSON.parse(value)
return value
} catch (ex) {
throw new TypeError(`Invalid JSON value`)
}
}
default:
return value
}