From af147692459a47aeb9212e8b6e672568bc422cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Fra=C5=9B?= Date: Tue, 12 Nov 2024 11:38:51 +0100 Subject: [PATCH] fix(@angular/cli): support default options for multiselect list x-prompt --- .../cli/src/command-builder/schematics-command-module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/angular/cli/src/command-builder/schematics-command-module.ts b/packages/angular/cli/src/command-builder/schematics-command-module.ts index ee941dca924c..80d3fa367496 100644 --- a/packages/angular/cli/src/command-builder/schematics-command-module.ts +++ b/packages/angular/cli/src/command-builder/schematics-command-module.ts @@ -204,7 +204,7 @@ export abstract class SchematicsCommandModule return definition.validator(Object.values(values).map(({ value }) => value)); }, - default: definition.default, + default: definition.multiselect ? undefined : definition.default, choices: definition.items?.map((item) => typeof item == 'string' ? { @@ -212,6 +212,7 @@ export abstract class SchematicsCommandModule value: item, } : { + ...item, name: item.label, value: item.value, },