mirror of
https://github.com/yewprint/yewprint
synced 2024-11-22 03:23:03 +00:00
Tree: fix node not visibly disabled
This commit is contained in:
parent
e5b5a5585a
commit
b01e006371
2 changed files with 6 additions and 2 deletions
|
@ -307,7 +307,8 @@ impl Component for TreeNode {
|
||||||
html! {
|
html! {
|
||||||
<li class={classes!(
|
<li class={classes!(
|
||||||
"bp3-tree-node",
|
"bp3-tree-node",
|
||||||
ctx.props().is_selected.then_some("bp3-tree-node-selected")
|
ctx.props().is_selected.then_some("bp3-tree-node-selected"),
|
||||||
|
ctx.props().disabled.then_some("bp3-disabled"),
|
||||||
)}>
|
)}>
|
||||||
<div
|
<div
|
||||||
class="bp3-tree-node-content"
|
class="bp3-tree-node-content"
|
||||||
|
@ -328,6 +329,8 @@ impl Component for TreeNode {
|
||||||
)}
|
)}
|
||||||
icon={Icon::ChevronRight}
|
icon={Icon::ChevronRight}
|
||||||
onclick={self.handler_caret_click.clone()}
|
onclick={self.handler_caret_click.clone()}
|
||||||
|
aria_hidden=true
|
||||||
|
tab_index={-1}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -71,7 +71,8 @@ impl Component for Example {
|
||||||
icon: Icon::Tag,
|
icon: Icon::Tag,
|
||||||
icon_intent: Some(Intent::Primary),
|
icon_intent: Some(Intent::Primary),
|
||||||
label: "Outer file".into(),
|
label: "Outer file".into(),
|
||||||
secondary_label: Some(html!(<Icon icon={Icon::EyeOpen} />)),
|
secondary_label: Some(html!(<Icon icon={Icon::Lock} />)),
|
||||||
|
disabled: true,
|
||||||
data: 3,
|
data: 3,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue