Skip to content

Conversation

@Celina1801
Copy link

@Celina1801 Celina1801 commented Jan 21, 2025

What is the problem that this PR addresses?

Closes #313

The issue relates to the default behavior of certain prompts in the questionary library. Currently, when a user selects an option in prompts like select, rawselect, or checkbox, the displayed options disappear immediately after selection. This behavior can make it difficult for users to review the available or selected options.

How did you solve it?

I added a new feature in the form of an optional flag keep_options_displayed to the following prompts:

select
rawselect
checkbox
Feature added:
If keep_options_displayed=True, the options remain displayed after the selection is made.
If keep_options_displayed=False (default behavior), the options disappear immediately after the selection.

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@tmbo
Copy link
Owner

tmbo commented Feb 28, 2025

does look reasonable, didn't have a chance yet to try it out though

use_search_filter: Union[str, bool, None] = False,
instruction: Optional[str] = None,
show_description: bool = True,
keep_options_displayed: bool = True,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description for the parameter

qmark: str = DEFAULT_QUESTION_PREFIX,
pointer: Optional[str] = DEFAULT_SELECTED_POINTER,
style: Optional[Style] = None,
keep_options_displayed: bool = True,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a description for the parameter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flag to retain options on the screen even after the user has selected an option

2 participants