fix: teleport was prepopulating prior wisper

This commit is contained in:
Evan Carroll 2026-01-20 20:11:37 -06:00
parent 41ea9d13cb
commit 864cfaec54
2 changed files with 19 additions and 9 deletions

View file

@ -128,8 +128,9 @@ pub fn ChatInput(
#[prop(optional)]
on_open_log: Option<Callback<()>>,
/// Signal containing the display name to whisper to. When set, pre-fills the input.
#[prop(optional, into)]
whisper_target: Option<Signal<Option<String>>>,
/// Uses RwSignal so the component can clear it after consuming.
#[prop(optional)]
whisper_target: Option<RwSignal<Option<String>>>,
/// List of available scenes for teleport command.
#[prop(optional, into)]
scenes: Option<Signal<Vec<SceneSummary>>>,
@ -240,6 +241,9 @@ pub fn ChatInput(
let _ = input.focus();
let len = whisper_prefix.len() as u32;
let _ = input.set_selection_range(len, len);
// Clear the whisper target so it doesn't re-trigger on re-render
whisper_signal.set(None);
}
});
}