Skip to content

Conversation

fihorvat
Copy link

@fihorvat fihorvat commented Sep 25, 2024

fixes #

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

I added the extension method for defining SearchHighlightStyle same as we have for HighlightStyle.

This allows us to specify SearchHighlightStyle using a fluent style like this:

AnsiConsole.Prompt(
  new SelectionPrompt<CustomSelectionItem>()
    .Title("Select one")
    .EnableSearch()
    .UseConverter(o => o.Name)
    .HighlightStyle(Color.Green)
    .SearchHighlightStyle(Color.DarkGreen) //<--
    .AddChoices(choices));

Please upvote 👍 this pull request if you are interested in it.

@fihorvat
Copy link
Author

@microsoft-github-policy-service agree

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.

1 participant