Skip to content

Commit

Permalink
fix: Use UseState::current() for unmount events
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Dec 1, 2023
1 parent fb66a99 commit 40ebce5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/components/src/accordion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub fn Accordion<'a>(cx: Scope<'a, AccordionProps<'a>>) -> Element<'a> {
use_on_unmount(cx, {
to_owned![status, platform];
move || {
if *status.get() == AccordionStatus::Hovering {
if *status.current() == AccordionStatus::Hovering {
platform.set_cursor(CursorIcon::default());
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/components/src/dropdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ where
use_on_unmount(cx, {
to_owned![status, platform];
move || {
if *status.get() == DropdownItemStatus::Hovering {
if *status.current() == DropdownItemStatus::Hovering {
platform.set_cursor(CursorIcon::default());
}
}
Expand Down Expand Up @@ -188,7 +188,7 @@ where
use_on_unmount(cx, {
to_owned![status, platform];
move || {
if *status.get() == DropdownStatus::Hovering {
if *status.current() == DropdownStatus::Hovering {
platform.set_cursor(CursorIcon::default());
}
}
Expand Down

0 comments on commit 40ebce5

Please sign in to comment.