DataSourceSettings: Fixes add header button, it should not trigger a save & test action (#31135)

This commit is contained in:
Torkel Ödegaard 2021-02-11 15:22:44 +01:00 committed by GitHub
parent e21f6a29b7
commit e38fc6939c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,7 @@ const getCustomHeaderRowStyles = stylesFactory(() => {
`,
};
});
const CustomHeaderRow: React.FC<CustomHeaderRowProps> = ({ header, onBlur, onChange, onRemove, onReset }) => {
const styles = getCustomHeaderRowStyles();
return (
@ -138,7 +139,7 @@ export class CustomHeadersSettings extends PureComponent<Props, State> {
onHeaderAdd = () => {
this.setState((prevState) => {
return { headers: [...prevState.headers, { id: uniqueId(), name: '', value: '', configured: false }] };
}, this.updateSettings);
});
};
onHeaderChange = (headerIndex: number, value: CustomHeader) => {