Skip to content

Commit 3d220a1

Browse files
committed
fix: build nightly
1 parent e56cc16 commit 3d220a1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

thaw/src/pagination/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,26 @@ pub fn Pagination(
9090
let no_next = Memo::new(move |_| page.get() == count.get());
9191
let no_previous = Memo::new(move |_| page.get() == 1);
9292

93-
let on_click_previous = move |_| {
93+
let on_click_previous = Callback::<ev::MouseEvent>::new(move |_| {
9494
page.update(|val| *val -= 1);
9595
if let Some(callback) = on_change.as_ref() {
9696
callback.call(page.get())
9797
}
98-
};
98+
});
9999

100-
let on_click_next = move |_| {
100+
let on_click_next = Callback::<ev::MouseEvent>::new(move |_| {
101101
page.update(|val| *val += 1);
102102
if let Some(callback) = on_change.as_ref() {
103103
callback.call(page.get())
104104
}
105-
};
105+
});
106106

107107
view! {
108108
<nav class=class_list!["thaw-pagination", class.map(| c | move || c.get())]>
109109
<ul>
110110
<li>
111111
<Button
112-
size=size.clone()
112+
size=size
113113
on_click=on_click_previous
114114
variant=ButtonVariant::Text
115115
icon=icondata_ai::AiLeftOutlined
@@ -132,7 +132,7 @@ pub fn Pagination(
132132
view! {
133133
<li>
134134
<Button
135-
size=size.clone()
135+
size=size
136136
style=Memo::new(move |_| if page.get() == nb {
137137
"color: var(--thaw-font-color-hover); border-color: var(--thaw-border-color-hover);".to_string()
138138
} else {
@@ -143,14 +143,14 @@ pub fn Pagination(
143143
} else {
144144
ButtonVariant::Text
145145
})
146-
on_click = move |_| {
146+
on_click=Callback::new(move |_: ev::MouseEvent| {
147147
if page.get() != nb {
148148
page.set(nb)
149149
}
150150
if let Some(callback) = on_change.as_ref() {
151151
callback.call(page.get())
152152
}
153-
}
153+
})
154154
round=true
155155
>
156156
{nb}

0 commit comments

Comments
 (0)