Tree: fix node not visibly disabled

This commit is contained in:
Cecile Tonglet 2023-11-07 10:46:55 +01:00
parent e5b5a5585a
commit b01e006371
2 changed files with 6 additions and 2 deletions

View file

@ -307,7 +307,8 @@ impl Component for TreeNode {
html! {
<li class={classes!(
"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
class="bp3-tree-node-content"
@ -328,6 +329,8 @@ impl Component for TreeNode {
)}
icon={Icon::ChevronRight}
onclick={self.handler_caret_click.clone()}
aria_hidden=true
tab_index={-1}
/>
}
} else {

View file

@ -71,7 +71,8 @@ impl Component for Example {
icon: Icon::Tag,
icon_intent: Some(Intent::Primary),
label: "Outer file".into(),
secondary_label: Some(html!(<Icon icon={Icon::EyeOpen} />)),
secondary_label: Some(html!(<Icon icon={Icon::Lock} />)),
disabled: true,
data: 3,
..Default::default()
}),