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] The checkbox / radio mode does not work in tree view #2278

Closed
1 of 7 tasks
JosuaCarl opened this issue Nov 25, 2024 · 2 comments · Fixed by #2279
Closed
1 of 7 tasks

[🐛 BUG] The checkbox / radio mode does not work in tree view #2278

JosuaCarl opened this issue Nov 25, 2024 · 2 comments · Fixed by #2279
Assignees
Labels
📄 Documentation Internal or public documentation GUI: Front-End 💥Malfunction Addresses an identified problem. 🟩 Priority: Low Low priority and doesn't need to be rushed

Comments

@JosuaCarl
Copy link
Contributor

JosuaCarl commented Nov 25, 2024

What went wrong? 🤔

The following snippet ignores the mode ("check" or "radio") and only returns a normal tree, despite being described otherwise in the documentation.

tgb.tree( "{x}", mode="check", lov="{lov}" )

Expected Behavior

Behave like:

tgb.selector( "{x}", mode="check", lov="{lov}" )

Steps to Reproduce Issue

  1. Run
x = ""
lov = [{'id': '1', 'label': 'P', 'children': [{'id': '2', 'label': 'C1', 'children': []}, {'id': '3', 'label': 'C2', 'children': []}]}]

with tgb.Page() as root:
    tgb.text( "Here's a Tree:")
    tgb.tree( "{x}",
        mode="check", lov="{lov}" )
    tgb.text( "Here's a Selector:")
    tgb.selector( "{x}",
        mode="check", lov="{lov}" )    

gui = Gui(page=root)

if __name__ == "__main__":
    gui.run( port=4999 )
  1. Look for checkboxes in the tree.

Solution Proposed

Implement "mode" in

const TreeView = (props: TreeViewProps) => {

, like in
const Selector = (props: SelTreeProps) => {

Browsers

Firefox

OS

Windows

Version of Taipy

4.0.1

Acceptance Criteria

  • A unit test reproducing the bug is added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@JosuaCarl JosuaCarl added the 💥Malfunction Addresses an identified problem. label Nov 25, 2024
@FredLL-Avaiga
Copy link
Member

This as a documentation bug :-)
Mode is not supported in the tree component.
You can request this feature, if you think it is interesting @JosuaCarl

@FredLL-Avaiga FredLL-Avaiga self-assigned this Nov 25, 2024
@FredLL-Avaiga FredLL-Avaiga added 📄 Documentation Internal or public documentation 🟩 Priority: Low Low priority and doesn't need to be rushed GUI: Front-End labels Nov 25, 2024
FredLL-Avaiga pushed a commit that referenced this issue Nov 25, 2024
@JosuaCarl
Copy link
Contributor Author

I think it would be a good feature, but I am currently not available to work on it. Maybe I will come back to it in the new year.

FredLL-Avaiga added a commit that referenced this issue Nov 25, 2024
* tree does not support mode
resolves #2278

* add copyright

---------

Co-authored-by: Fred Lefévère-Laoide <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 Documentation Internal or public documentation GUI: Front-End 💥Malfunction Addresses an identified problem. 🟩 Priority: Low Low priority and doesn't need to be rushed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants