Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable selected style but respect highlighted for default choice of select #342

Open
1 task done
abrahammurciano opened this issue Dec 5, 2023 · 1 comment
Open
1 task done
Labels
Enhancement New feature or request

Comments

@abrahammurciano
Copy link

Question

When using questionary.select() it styles the default choice according to the "selected" style (which is reverse by default). I managed to make it the same as all the rest by using Style([("selected", "noreverse"), ...]), but then it doesn't respect the "highlighted" style when pointing to the default choice.

This is what it looks like when the selected choice is also highlighted:
image

And this is what it looks like when another choice is highlighted:
image

I would like for the default choice to also be purple when the pointer is on it.

What have you already tried?

Style(
    [
        ("highlighted", "fg:ansibrightmagenta bold"),
        ("selected", "noreverse"),
    ]
)
Style(
    [
        ("highlighted", "fg:ansibrightmagenta bold"),
        ("selected", ""),
    ]
)
Style(
    [
        ("highlighted", "fg:ansibrightmagenta bold"),
    ]
)

Read the documentation

  • I have checked to ensure that my question is not answered by the documentation.
@abrahammurciano abrahammurciano added the Question Further information is requested label Dec 5, 2023
@kiancross kiancross added Enhancement New feature or request and removed Question Further information is requested labels Dec 29, 2023
@kiancross
Copy link
Collaborator

This probably needs the addition of something like a selected-highlighted class. Happy to review any PRs which address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants