Add dependent field provider to resource deployment (#13664)

* Add dependent field provider to resource deployment

* Change name to value provider service

* Add error handling

* providerId -> id

* Set dropdown value correctly

* missed id

* back to providerId

* fix updating missed id

* remove placeholder
This commit is contained in:
Charles Gagnon
2020-12-04 17:21:30 -08:00
committed by GitHub
parent 757ac1d4aa
commit a70dce7855
12 changed files with 147 additions and 15 deletions

View File

@@ -9,10 +9,10 @@ import * as loc from '../localizedConstants';
class OptionsSourcesService {
private _optionsSourceStore = new Map<string, rd.IOptionsSourceProvider>();
registerOptionsSourceProvider(provider: rd.IOptionsSourceProvider): void {
if (this._optionsSourceStore.has(provider.optionsSourceId)) {
throw new Error(loc.optionsSourceAlreadyDefined(provider.optionsSourceId));
if (this._optionsSourceStore.has(provider.id)) {
throw new Error(loc.optionsSourceAlreadyDefined(provider.id));
}
this._optionsSourceStore.set(provider.optionsSourceId, provider);
this._optionsSourceStore.set(provider.id, provider);
}
getOptionsSource(optionsSourceProviderId: string): rd.IOptionsSourceProvider {