Skip to content

Commit 6f1144d

Browse files
committed
feat(@angular/cli): Added support for multiselect list prompt
1 parent 6fce793 commit 6f1144d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular/cli/models/schematic-command.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88
import {
9+
JsonObject,
910
experimental,
1011
json,
1112
logging,
@@ -309,7 +310,8 @@ export abstract class SchematicCommand<
309310
question.type = 'confirm';
310311
break;
311312
case 'list':
312-
question.type = 'list';
313+
const multiselect = !!definition.raw && (definition.raw as JsonObject)['multiselect'];
314+
question.type = !!multiselect ? 'checkbox' : 'list';
313315
question.choices = definition.items && definition.items.map(item => {
314316
if (typeof item == 'string') {
315317
return item;

0 commit comments

Comments
 (0)