mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataSourceSettings: Fixes add header button, it should not trigger a save & test action (#31135)
This commit is contained in:
parent
e21f6a29b7
commit
e38fc6939c
@ -52,6 +52,7 @@ const getCustomHeaderRowStyles = stylesFactory(() => {
|
|||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const CustomHeaderRow: React.FC<CustomHeaderRowProps> = ({ header, onBlur, onChange, onRemove, onReset }) => {
|
const CustomHeaderRow: React.FC<CustomHeaderRowProps> = ({ header, onBlur, onChange, onRemove, onReset }) => {
|
||||||
const styles = getCustomHeaderRowStyles();
|
const styles = getCustomHeaderRowStyles();
|
||||||
return (
|
return (
|
||||||
@ -138,7 +139,7 @@ export class CustomHeadersSettings extends PureComponent<Props, State> {
|
|||||||
onHeaderAdd = () => {
|
onHeaderAdd = () => {
|
||||||
this.setState((prevState) => {
|
this.setState((prevState) => {
|
||||||
return { headers: [...prevState.headers, { id: uniqueId(), name: '', value: '', configured: false }] };
|
return { headers: [...prevState.headers, { id: uniqueId(), name: '', value: '', configured: false }] };
|
||||||
}, this.updateSettings);
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onHeaderChange = (headerIndex: number, value: CustomHeader) => {
|
onHeaderChange = (headerIndex: number, value: CustomHeader) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user