Skip to content

Commit 866fa5e

Browse files
committed
Fix url update
1 parent 9824a5f commit 866fa5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ConfigEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { ChangeEvent } from 'react';
2-
import { InlineFormLabel, Field, Input, Legend } from '@grafana/ui';
2+
import { InlineFormLabel, Input, Legend } from '@grafana/ui';
33
import { DataSourcePluginOptionsEditorProps } from '@grafana/data';
44
import { JsonApiDataSourceOptions } from './types';
55
import {} from '@emotion/core';
@@ -8,7 +8,7 @@ interface Props extends DataSourcePluginOptionsEditorProps<JsonApiDataSourceOpti
88

99
export const ConfigEditor: React.FC<Props> = ({ options, onOptionsChange }) => {
1010
const onUrlChange = (e: ChangeEvent<HTMLInputElement>) => {
11-
onOptionsChange({ ...options, jsonData: { ...options, url: e.currentTarget.value } });
11+
onOptionsChange({ ...options, url: e.currentTarget.value });
1212
};
1313
const onParamsChange = (e: ChangeEvent<HTMLInputElement>) => {
1414
onOptionsChange({ ...options, jsonData: { ...options.jsonData, queryParams: e.currentTarget.value } });

0 commit comments

Comments
 (0)