Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report]: MTreeview 的OpenOnClick和Active存在冲突 #2171

Open
VleaStwo opened this issue Sep 24, 2024 · 2 comments
Open

[Bug Report]: MTreeview 的OpenOnClick和Active存在冲突 #2171

VleaStwo opened this issue Sep 24, 2024 · 2 comments

Comments

@VleaStwo
Copy link
Contributor

Masa.Blazor version

1.7.3

Describe the bug

treeview 的 OpenOnClick="true" 和Active/Value冲突了

会导致 可展开项 无法被Active或Value(Selectable)

Selectable能够通过单点勾选框实现勾上, 但是SelectOnRowClick会失效

image

Expected Behavior

可以考虑 激活/勾选 并且打开

Steps To Reproduce

No response

Reproduction code

No response

.NET version

net 8.0

What browsers are you seeing the problem on?

Microsoft Edge

Additional context

No response

@capdiem
Copy link
Contributor

capdiem commented Sep 26, 2024

@VleaStwo 看了下Vuetify的逻辑,OpenOnClick的时候是不会激活父元素的。我觉得select和active的行为是一样的,只是UI不一样,不建议一起使用,如果只是想选择的时候有active的样式,只需要使用css。

.m-treeview-node--selected > .m-treeview-node__root--selectable {
  background-color: lightblue;
}

@capdiem
Copy link
Contributor

capdiem commented Sep 26, 2024

@VleaStwo 可能在v2的时候考虑移除active功能。

@capdiem capdiem added this to the 2.0.0 milestone Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants