Skip to content

Commit

Permalink
refactor(core/projects): Remove FormikApplicationPicker in favor of A…
Browse files Browse the repository at this point in the history
…pplicationPickerInput
  • Loading branch information
christopherthielen authored and mergify[bot] committed May 14, 2020
1 parent d718066 commit f1b0caf
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 106 deletions.
11 changes: 5 additions & 6 deletions app/scripts/modules/core/src/projects/configure/Applications.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';

import { FormikFormField } from 'core/presentation';
import { ApplicationsPickerInput } from 'core/widgets';
import { FormikErrors, getIn, FormikProps } from 'formik';
import { isEqual } from 'lodash';

import { IProject, IProjectPipeline } from 'core/domain';
import { IWizardPageComponent } from 'core/modal';
import { FormikApplicationsPicker } from './FormikApplicationsPicker';

export interface IApplicationsProps {
formik: FormikProps<IProject>;
Expand Down Expand Up @@ -42,13 +44,10 @@ export class Applications extends React.Component<IApplicationsProps> implements
}

public render() {
const { allApplications } = this.props;

return (
<FormikApplicationsPicker
className="ConfigureProject-Applications"
<FormikFormField
name="config.applications"
applications={allApplications}
input={props => <ApplicationsPickerInput multi={true} {...props} />}
/>
);
}
Expand Down
7 changes: 4 additions & 3 deletions app/scripts/modules/core/src/projects/configure/Clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { IWizardPageComponent } from 'core/modal';
import { FormikFormField, ReactSelectInput, TextInput } from 'core/presentation';
import { NgReact } from 'core/reactShims';

import { FormikApplicationsPicker } from './FormikApplicationsPicker';

export interface IClustersProps {
accounts: IAccount[];
}
Expand Down Expand Up @@ -122,7 +120,10 @@ export class Clusters extends React.Component<IClustersProps> implements IWizard
</label>

{!!cluster.applications && (
<FormikApplicationsPicker name={applicationsPath} applications={applications} />
<FormikFormField
name={applicationsPath}
input={props => <ReactSelectInput multi={true} stringOptions={applications} {...props} />}
/>
)}
</td>

Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion app/scripts/modules/core/src/projects/configure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export * from './Clusters';
export * from './ConfigureProjectModal';
export * from './Pipelines';
export * from './ProjectAttributes';
export * from './FormikApplicationsPicker';

0 comments on commit f1b0caf

Please sign in to comment.