diff --git a/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx b/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx index 35a241dad27..b4f8d041b82 100644 --- a/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx +++ b/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx @@ -4,7 +4,7 @@ import { Controller, FieldErrors, UseFormReturn } from 'react-hook-form'; import { selectors } from '@grafana/e2e-selectors'; import { ExpressionDatasourceRef } from '@grafana/runtime/src/utils/DataSourceWithBackend'; import { Button, Field, FormFieldErrors, FormsOnSubmit, Stack, Input, Legend } from '@grafana/ui'; -import { OldFolderPicker } from 'app/core/components/Select/OldFolderPicker'; +import { FolderPicker } from 'app/core/components/Select/FolderPicker'; import { DataSourcePicker } from 'app/features/datasources/components/picker/DataSourcePicker'; import { @@ -21,7 +21,6 @@ import { ImportDashboardLibraryPanelsList } from './ImportDashboardLibraryPanels interface Props extends Pick, 'register' | 'control' | 'getValues' | 'watch'> { uidReset: boolean; inputs: DashboardInputs; - initialFolderUid: string; errors: FieldErrors; onCancel: () => void; onUidReset: () => void; @@ -35,7 +34,6 @@ export const ImportDashboardForm = ({ getValues, uidReset, inputs, - initialFolderUid, onUidReset, onCancel, onSubmit, @@ -72,8 +70,8 @@ export const ImportDashboardForm = ({ ( - + render={({ field: { ref, value, onChange, ...field } }) => ( + onChange({ uid, title })} value={value.uid} /> )} name="folder" control={control} diff --git a/public/app/features/manage-dashboards/components/ImportDashboardOverview.tsx b/public/app/features/manage-dashboards/components/ImportDashboardOverview.tsx index 96caec35f96..f00e1c4ce55 100644 --- a/public/app/features/manage-dashboards/components/ImportDashboardOverview.tsx +++ b/public/app/features/manage-dashboards/components/ImportDashboardOverview.tsx @@ -112,7 +112,6 @@ class ImportDashboardOverviewUnConnected extends PureComponent { onUidReset={this.onUidReset} onSubmit={this.onSubmit} watch={watch} - initialFolderUid={folder.uid} /> )}