🌐 AI搜索 & 代理 主页
Skip to content

Commit fdbd0f4

Browse files
committed
Pass checked as parameter to Radio
1 parent 55da942 commit fdbd0f4

File tree

1 file changed

+3
-3
lines changed
  • pgml-dashboard/src/components/inputs/radio

1 file changed

+3
-3
lines changed

pgml-dashboard/src/components/inputs/radio/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ impl RadioOption {
2424
}
2525
}
2626

27-
pub fn checked(mut self) -> Self {
28-
self.checked = true;
27+
pub fn checked(mut self, checked: bool) -> Self {
28+
self.checked = checked;
2929
self
3030
}
3131

@@ -53,7 +53,7 @@ impl Default for Radio {
5353
"test-radio",
5454
&[
5555
RadioOption::new("Enabled (recommended)".into(), 1),
56-
RadioOption::new("Disabled".into(), 0).checked(),
56+
RadioOption::new("Disabled".into(), 0).checked(true),
5757
],
5858
)
5959
}

0 commit comments

Comments
 (0)