mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Nested folder picker: Move options into overlay (#71042)
* move options into overlay * add some unit tests * Update public/app/features/browse-dashboards/components/BrowseActions/MoveModal.tsx Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com> * minor refactoring based on review comments * just pass in uid --------- Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import { TimeZone } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { CollapsableSection, Field, Input, RadioButtonGroup, TagsInput } from '@grafana/ui';
|
||||
import { NestedFolderPicker } from 'app/core/components/NestedFolderPicker/NestedFolderPicker';
|
||||
import { FolderChange, ROOT_FOLDER } from 'app/core/components/NestedFolderPicker/types';
|
||||
import { FolderChange } from 'app/core/components/NestedFolderPicker/types';
|
||||
import { Page } from 'app/core/components/Page/Page';
|
||||
import { FolderPicker } from 'app/core/components/Select/FolderPicker';
|
||||
import { updateTimeZoneDashboard, updateWeekStartDashboard } from 'app/features/dashboard/state/actions';
|
||||
@@ -32,7 +32,7 @@ export function GeneralSettingsUnconnected({
|
||||
const [renderCounter, setRenderCounter] = useState(0);
|
||||
|
||||
const onFolderChange = (newFolder: FolderChange) => {
|
||||
dashboard.meta.folderUid = newFolder.uid === ROOT_FOLDER ? '' : newFolder.uid;
|
||||
dashboard.meta.folderUid = newFolder.uid;
|
||||
dashboard.meta.folderTitle = newFolder.title;
|
||||
dashboard.meta.hasUnsavedFolderChange = true;
|
||||
setRenderCounter(renderCounter + 1);
|
||||
|
||||
Reference in New Issue
Block a user