Skip to content

Commit

Permalink
chore: run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Nov 3, 2023
1 parent f3813c1 commit 205b7f2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/components/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,11 @@ pub fn Input<'a>(cx: Scope<'a, InputProps<'a>>) -> Element {
let onkeydown = {
to_owned![editable, focus_manager];
move |e: Event<KeyboardData>| {
if focus_manager.is_focused() {
if e.data.key != Key::Enter {
editable.process_event(&EditableEvent::KeyDown(e.data));
cx.props
.onchange
.call(editable.editor().current().to_string());
}
if focus_manager.is_focused() && e.data.key != Key::Enter {
editable.process_event(&EditableEvent::KeyDown(e.data));
cx.props
.onchange
.call(editable.editor().current().to_string());
}
}
};
Expand Down

0 comments on commit 205b7f2

Please sign in to comment.