Giter VIP home page Giter VIP logo

mendix-tree-view's Introduction

Apache License Support WM Studio GitHub release GitHub issues Available

Tree View for Mendix

Mendix Tree View widget using Ant Design Table (MIT License).

logo

Show a Tree structure in your Mendix project

screenshot

See test-project https://treeview-react-sandbox.mxapps.io/ for a live demo! The test-project itself can be downloaded here

Missing features? See TODO at the bottom to see which items are still on the TODO list. If you find other bugs, please report this as an issue here

Features

  • Display a tree structure in a tree view
  • Data Sources: XPath, Microflow, Nanoflow
  • Load a complete tree structure
  • Two patterns: Node-Parent or Node-Children
  • Load children over reference, xpath or nanoflow
  • On Click events
  • Drag & Drop (Node-Parent)
  • State management (keep treestructure expansion in browser storage)
  • Experimental Client side search (Only on loading a complete tree)

This widget is about 300Kb uncompressed, so in your cloud deployment this widget should take about 83 Kb of network resources

Tested:

  • IE11 & Edge
  • Chrome
  • Firefox
  • Safari

Basic Configuration

1. Data Source

settings

2. Data

settings

  • You can choose to load a complete tree, or partial
  • The rest of the settings are self-explanatory

3. Relation

settings

4. UI

settings

  • Note: You can now also set the class name of a node with an attribute

5. Drag & Drop

settings

  • Drag & Drop is only enabled for objects with a parent relation
  • The widget will do the changes on the object by itself

6. Search (experimental)

settings

  • This feature is highly experimental and might be subject to change in future releases
  • It requires another helper entity, which will be used in calling a Nanoflow
  • The helper entity has a reference set of all the objects that are loaded, and the search query. It is up to you to create a Nanoflow that returns a list of objects to be shown (act as a filter)

7. Misc

  • This deals with state management and exposing an external method to select an item

8. Events

settings

Demo project

https://treeview-react-sandbox.mxapps.io/

Domain model

domain

  • This is an example of the domain model used in our test-project
  • Note: Only use one type of relation! Either Node-Parent or Node-Children! This domain model features both, as cwe reate two types of sets of nodes to show all capabilities

Issues, suggestions and feature requests

Please report your issues here

TODO

These are action items on the list for future releases

  • WebModeler preview
  • Draggable NodeChildren
  • On DragChange mf/nf
  • Automated unit tests & CI/CD pipeline

License

Apache 2

mendix-tree-view's People

Contributors

jeltemx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mendix-tree-view's Issues

Feature request

@JelteMX Is there a possibility to select a node by guid or something like this? It would be a very nice feature.
Something like this is implemented in the treetable but not in the treeview.
Thanks in advance

Node titel not always visible when using Node title type 'Nanoflow'

Hi,

we implemented the Tree View for a customer. One of the requirements was a color coded indicator in front of the node title to indicate the status of that tree item.

To achieve this, I used the node type nanoflow feature to change the title into a HTML string, and then style it with css:

'<div class="tree-node-indicator ' + $TreeNode/Status+ '"></div><div class="tree-node-name">' + $TreeNode/Name + '</div>'

This works, but on a regular basis, the node title is not visible. When you open an other node, the title appears.

Step 1:
image

Step 2:
image

I did debug (added log messages into the nanoflow) and see that in case this happens, for that particular tree node both attributes are available in the Nanoflow and the html output is created.

Any tips on how to address this issue?

Thanks in advance.

Greatings,

Bart

Search on Enter Key press

Hello,

We have been utilizing the tree view widget, finding it incredibly helpful. However, with a substantial amount of data, we've noticed a significant delay in loading, attributed to searching on every character input.

To enhance performance, Can we get a feature to search only on enter key press?

Thanks,
Pranav

Feature request

Hi Jelte,

first of all, great job!

In all modesty and understanding some suggestions that would make my world, and that of my client a little bit better...

What would be great is if it is possible to show more attributes of a node, which will also make it possible to create a boolean attribute for the node and with that to 'select' a node and save that selection. Usecase: subscribing to a service concerning that node, like notifications.

Also, while I'm at it, is it maybe possible to define where to put the Icon (first or last) and make it clickable? The reason I ask is that a client want to create an action to go to an edit popup concerning that node, when clicking on a 'three dots' icon, mobile style (or even a dropdown menu with update and delete possibilities).

And a nice to have would be to be able to choose between the 'arrow' or the 'plus/minus' (from tree table widget) icons as the 'tree-fold-icon' (no idea how to call them).

I know you probably have tons of other stuff to do, but just wanted to let you know!

Oh and the search functionality is also really helpful!

Thanks again!

Gr,

Bart

feature request

Hi Jelte,

When I have the treeview widget on a page, and I have a button to add a new treenode that has a parent in the tree I would like to refresh the treeview display once the new popup page that collects the new treenode attributes is saved and closed and we return to the original page.
Is it possible that we get an option for the treeview instance that we're using so we can trigger the treeview to refresh/reload to show the added treenode?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.