-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.Indicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.Issue is created by anyone that is not a collaborator in the repository.
Description
Versions
Botbuilder version 4.5.3
NodeJS version 10.16.3
Describe the bug
It is impossible to set ListStyle.none to ChoicePrompt.
To Reproduce
Steps to reproduce the behavior:
- Set a promptOptions with style as ListStyle.none
const promptOptions: PromptOptions = { prompt: 'Say a letter' , choices: ['A', 'B'], style: ListStyle.none } - Call to a prompt type ChoicePromt with this promptOptions
return await stepContext.prompt('CHOICE_PROMPT', promptOptions); - Options A and B are shown on the screen when they should not be shown.
Expected behavior
Show only the text 'Say a letter' in the screen. (client)
Additional context
The problem is in ChoicePrompt.ts
The style is set to ListStyle.auto by default
Line 67: this.style = ListStyle.auto;
In the onPrompt method if the options.style is false, null undefined or 0 , the assigned style will be the default one (ListStyle.auto).
Line 83: const choiceStyle: ListStyle = options.style || this.style;
The number none is assigned the value 0 .
File prompt.ts Line 17 :
export enum ListStyle {
/**
* Don't include any choices for prompt.
*/
none,
`
[bug]
Metadata
Metadata
Assignees
Labels
Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.Required for internal Azure reporting. Do not delete. Do not change color.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.Indicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.Issue is created by anyone that is not a collaborator in the repository.