handle paste on geo data editor

This commit is contained in:
Fendy Heryanto
2025-02-24 08:56:10 +00:00
parent d27eb9d80a
commit aaf504c5b7
2 changed files with 131 additions and 96 deletions

View File

@@ -346,10 +346,13 @@ export default function convertCellData(
}
}
case UITypes.GeoData: {
const geoValue = value.replace(',', ';').split(';')
const geoValue = value
.replace(',', ';')
.split(';')
.map((k) => k.trim())
if (geoValue.length === 2) {
if (!isNaN(Number(geoValue[0])) && !isNaN(Number(geoValue[1]))) {
return geoValue.map(k => k.trim()).join(';')
return geoValue.map((k) => Number(k).toFixed(10)).join(';')
}
}
throw new SilentTypeConversionError()