Closed weilies closed 2 years ago
I have an import file
code,from,to IMSF01,0700,2200
but after import (code below), i noticed the console log showing 'from' node is storing 700 (number) instead of 0700 (string)
this.papa.parse($event.srcElement.files[0], { header: true, dynamicTyping: true, skipEmptyLines: "greedy", worker: true, complete: (result, file) => { // BUG! imported 0700 became 700 console.log(result); this.importData = result.data; } })
Is there any any config i can turn on to preserve the leading zeros?
I suspect that dynamicTyping is the cause. Have you tried setting it to false?
dynamicTyping
I have an import file
code,from,to IMSF01,0700,2200
but after import (code below), i noticed the console log showing 'from' node is storing 700 (number) instead of 0700 (string)
Is there any any config i can turn on to preserve the leading zeros?