ProvisioningAwarefolderPicker: Exclude current folder UID from selection (#110840)

ProvisioningAwarefolderPicker: Exclude current folder uid from selection
This commit is contained in:
Yunwen Zheng
2025-09-10 10:43:42 -04:00
committed by GitHub
parent 83e190a160
commit e58765632d
2 changed files with 2 additions and 0 deletions
@@ -290,6 +290,7 @@ function GeneralSettingsEditViewComponent({ model }: SceneComponentProps<General
value={meta.folderUid}
onChange={dashboard.isManagedRepository() ? model.onProvisionedFolderChange : model.onFolderChange}
repositoryName={dashboard.getManagerIdentity()}
excludeUIDs={meta?.folderUid ? [meta.folderUid] : undefined}
/>
</Field>
@@ -137,6 +137,7 @@ function FormContent({ initialValues, selectedItems, repository, workflowOptions
clearErrors('targetFolderUID');
}}
repositoryName={repository.name}
excludeUIDs={[...Object.keys(selectedItems?.folder).map((uid) => uid)]}
/>
</Field>
<ResourceEditFormSharedFields