Skip to content

Commit 95b1fb9

Browse files
Merge branch 'dev-flex-2024' into location-group-may-2024
2 parents c54b3a2 + c56c2bb commit 95b1fb9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/manager/components/transform/CustomCSVForm.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type Props = {
1717
onChangeCsvData: ({target: {name?: string, value: string}}) => void,
1818
onSaveCsvData: () => void,
1919
placeholder?: string,
20+
validateHeaders?: boolean
2021
}
2122
const CustomCSVForm = (props: Props) => {
2223
const [errorCount, setErrorCount] = useState(0)
@@ -34,9 +35,11 @@ const CustomCSVForm = (props: Props) => {
3435
} = props
3536

3637
useEffect(() => {
38+
// Default to true
39+
const validateHeaders = props.validateHeaders !== undefined ? props.validateHeaders : true
3740
setErrorCount(0)
3841

39-
parseString(csvData, { headers: true })
42+
parseString(csvData, { headers: validateHeaders })
4043
.on('error', _ => setErrorCount(errorCount + 1))
4144
}, [csvData])
4245

lib/manager/components/transform/ReplaceFileFromString.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default class ReplaceFileFromString extends Component<TransformProps<Repl
6868
inputIsSame={inputIsSame}
6969
onChangeCsvData={this._onChangeCsvData}
7070
onSaveCsvData={this._onSaveCsvData}
71+
validateHeaders={transformation['@type'] !== 'AppendToFileTransformation'}
7172
/>
7273
)
7374
}

0 commit comments

Comments
 (0)