disable the checkbox for schemas owned by user (#22178)

This commit is contained in:
Alan Ren
2023-03-06 15:14:46 -08:00
committed by GitHub
parent f25599119e
commit 29c1f5edd0

View File

@@ -190,7 +190,11 @@ export class UserDialog extends ObjectManagementDialogBase<ObjectManagement.User
}
private initializeOwnedSchemaSection(): void {
this.ownedSchemaTable = this.createTableList(localizedConstants.OwnedSchemaSectionHeader, this.viewInfo.schemas, this.objectInfo.ownedSchemas);
const ownedSchemaData = this.viewInfo.schemas.map(name => {
const isSelected = this.objectInfo.ownedSchemas.indexOf(name) !== -1;
return [{ enabled: !isSelected, checked: isSelected }, name];
});
this.ownedSchemaTable = this.createTableList(localizedConstants.OwnedSchemaSectionHeader, this.viewInfo.schemas, this.objectInfo.ownedSchemas, ownedSchemaData);
this.ownedSchemaSection = this.createGroup(localizedConstants.OwnedSchemaSectionHeader, [this.ownedSchemaTable]);
}