mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 11:44:26 -06:00
parent
93eb8cb51d
commit
ce630b2dc5
@ -35,8 +35,11 @@ const pageNav: NavModelItem = {
|
||||
function NewDashboardsFolder({ createNewFolder }: Props) {
|
||||
const [queryParams] = useQueryParams();
|
||||
const onSubmit = (formData: FormModel) => {
|
||||
createNewFolder(formData.folderName, String(queryParams['folderUid']));
|
||||
const folderUid = typeof queryParams['folderUid'] === 'string' ? queryParams['folderUid'] : undefined;
|
||||
|
||||
createNewFolder(formData.folderName, folderUid);
|
||||
};
|
||||
|
||||
const validateFolderName = (folderName: string) => {
|
||||
return validationSrv
|
||||
.validateNewFolderName(folderName)
|
||||
|
@ -18,7 +18,7 @@ export const DashboardActions: FC<Props> = ({ folderUid, canCreateFolders = fals
|
||||
url = `dashboards/folder/new/`;
|
||||
}
|
||||
|
||||
if ((isTypeNewFolder && config.featureToggles.nestedFolders) || folderUid) {
|
||||
if (folderUid) {
|
||||
url += `?folderUid=${folderUid}`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user