From a45cfe1ce90837aef023507a8198d8eead0b4ee9 Mon Sep 17 00:00:00 2001 From: Su Date: Tue, 4 Apr 2023 17:43:56 -0700 Subject: [PATCH] address comments Signed-off-by: Su --- .../components/create_form/create_data_source_form.tsx | 2 +- .../components/edit_form/edit_data_source_form.test.tsx | 2 +- .../components/edit_form/edit_data_source_form.tsx | 9 +-------- src/plugins/data_source_management/public/types.ts | 6 ------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx index e03831878398..1c08da5d6371 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx @@ -120,7 +120,7 @@ export class CreateDataSourceForm extends React.Component< }); }; - onChangeAuthType = (e: { target: { value: any } }) => { + onChangeAuthType = (e: React.ChangeEvent) => { this.setState({ auth: { ...this.state.auth, type: e.target.value as AuthType } }); }; diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.test.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.test.tsx index 527c8ab0f141..41133f65035a 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.test.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.test.tsx @@ -290,7 +290,7 @@ describe('Datasource Management: Edit Datasource Form', () => { }); /* Save Changes */ - test('should update the form with NoAUth on click save chan ges', async () => { + test('should update the form with NoAuth on click save changes', async () => { await new Promise((resolve) => setTimeout(() => { updateInputFieldAndBlur(component, descriptionFieldIdentifier, ''); diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx index 44ee6b2986d5..82464d018768 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx @@ -162,7 +162,7 @@ export class EditDataSourceForm extends React.Component { + onChangeAuthType = (e: React.ChangeEvent) => { this.setState({ auth: { ...this.state.auth, type: e.target.value as AuthType } }, () => { this.onChangeFormValues(); }); @@ -738,13 +738,6 @@ export class EditDataSourceForm extends React.Component - {/* this.onChangeAuthType(id)} - name="Credential" - data-test-subj="editDataSourceSelectAuthType" - /> */}