diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a1a7144..151fcd09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Ctrl-b/Ctrl-f for left/right - Ctrl-j/Ctrl-g for enter/cancel - Added 'with_starting_filter_input' to both Select and MultiSelect, which allows for setting an initial value to the filter section of the prompt. +- Added 'with_answered_prompt_prefix' to RenderConfig to allow customization of answered prompt prefix ### Fixes diff --git a/inquire/src/ui/render_config.rs b/inquire/src/ui/render_config.rs index 30d72042..668bc83e 100644 --- a/inquire/src/ui/render_config.rs +++ b/inquire/src/ui/render_config.rs @@ -217,6 +217,12 @@ impl<'a> RenderConfig<'a> { self } + /// Sets the answered prompt prefix and its style sheet. + pub fn with_answered_prompt_prefix(mut self, answered_prompt_prefix: Styled<&'a str>) -> Self { + self.answered_prompt_prefix = answered_prompt_prefix; + self + } + /// Sets style for text inputs. pub fn with_text_input(mut self, text_input: StyleSheet) -> Self { self.text_input = text_input;