|
| 1 | +[](https://travis-ci.org/JelteMX/mendix-dynamic-table) |
| 2 | +[](https://coveralls.io/github/JelteMX/mendix-dynamic-table?branch=master) |
| 3 | +[]([https://david-dm.org/JelteMX/mendix-dynamic-table](https://david-dm.org/JelteMX/mendix-dynamic-table)) |
| 4 | +[]([https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev](https://david-dm.org/JelteMX/mendix-dynamic-table?type=dev)) |
| 5 | +[-orange.svg)](https://docs.mendix.com/developerportal/app-store/app-store-content-support) |
| 6 | +[](https://appstore.home.mendix.com/link/modeler/) |
| 7 | +[](https://github.com/JelteMX/mendix-dynamic-table/releases/latest) |
| 8 | +[](https://github.com/JelteMX/mendix-dynamic-table/issues) |
| 9 | + |
| 10 | +## Dynamic (Tree) Table for Mendix |
| 11 | + |
| 12 | +Mendix Dynamic (Tree) Table using [Ant Design Table](https://ant.design/components/table/) (MIT License). This is inspired on the [Tree Table widget](https://appstore.home.mendix.com/link/app/111095/), but takes objects in the columns as well. |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | +Show a reference table. Rows & Columns are Mendix objects, Entry objects are in between. |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +> See test-project [https://dynamictabletest-sandbox.mxapps.io/](https://dynamictabletest-sandbox.mxapps.io/) for a live demo! On the bottom of this page there is a short explanation of the Domain model that is used. |
| 21 | +
|
| 22 | +> 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](https://github.com/JelteMX/mendix-dynamic-table/issues) |
| 23 | +
|
| 24 | +## Features |
| 25 | + |
| 26 | +- Display a tree structure in a table |
| 27 | +- Data Sources: XPath, Microflow, Nanoflow |
| 28 | +- Children: Get over reference, Microflow, Nanoflow |
| 29 | +- Selection of rows (single, multi) |
| 30 | +- Events: Click/Double click on Row, Column, Entry or empty field |
| 31 | + |
| 32 | +> This widget is about 850Kb uncompressed, so in your cloud deployment this widget should take about 220 Kb of network resources |
| 33 | +
|
| 34 | +Tested: |
| 35 | + |
| 36 | +- IE11 & Edge |
| 37 | +- Chrome |
| 38 | +- Firefox |
| 39 | +- Safari |
| 40 | + |
| 41 | +## Basic Configuration |
| 42 | + |
| 43 | +### 1. Row |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | +- Rows can be retrieved over XPath, Microflows and Nanoflows |
| 48 | +- Your title can be purely text or HTML, either through the attribute or Nanoflow. Make sure you sanitize any user input to prevent XSS issues. |
| 49 | + |
| 50 | +### 2. Row Children |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +- This is totally optional. If you want to do a tree structure, please configure the children |
| 55 | +- You can either get these over a Child reference (see bottom for explanation) or through a Microflow/Nanoflow when using a hasChildren attribute |
| 56 | + |
| 57 | +### 3. Column |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +- Columns can be retrieved over XPath, Microflows and Nanoflows |
| 62 | +- Your title can be purely text or HTML, either through the attribute or Nanoflow. Make sure you sanitize any user input to prevent XSS issues. |
| 63 | + |
| 64 | +### 4. Entries |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +- An Entry is an object that is linked to 1 row and 1 column |
| 69 | +- An Entry has a title (see Column/Row title, same principle) |
| 70 | +- In order to retrieve entries, you will need to use a Data Helper (see next) |
| 71 | + |
| 72 | +### 5. Data Helper |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +- See explanation in the settings screen |
| 77 | + |
| 78 | +### 6. Selection |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +### 7. Events |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +### 8. UI Settings |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +## Demo project |
| 91 | + |
| 92 | +[https://dynamictabletest-sandbox.mxapps.io/](https://dynamictabletest-sandbox.mxapps.io/) |
| 93 | + |
| 94 | +### Domain Model |
| 95 | + |
| 96 | +This demo uses the following domain model: |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +Short explanation: |
| 101 | + |
| 102 | +- A table is placed inside a data view with a `View` object |
| 103 | +- For the first rows, it will get all `Rows` that have a reference to `View` and `_Root = true` |
| 104 | +- Every row might have children. You either get these over a reference `Children`, or when you use a Microflow and `_hasChildren = true` |
| 105 | +- `Column` Objects also have a reference to View, although it is not entirely necessary |
| 106 | +- When loading `Entry` object, the widget will create a `EntryHelper` object that has references to the shown Rows&Columns. This helper is passed down to a microflow/nanoflow |
| 107 | +- When the `Entry` objects are loaded, the widget will place these in the correct field based on the reference to a Column/Row |
| 108 | +- The `SelectionHelper` is used for selections, but this is based on the test-project and can be disregarded here. |
| 109 | + |
| 110 | +## Issues, suggestions and feature requests |
| 111 | + |
| 112 | +Please report your issues [here](https://github.com/JelteMX/mendix-dynamic-table/issues) |
| 113 | + |
| 114 | +## TODO |
| 115 | + |
| 116 | +The following things need to be further tested and/or fixed. Please don't report this as a bug if this is in the TODO list: |
| 117 | + |
| 118 | +- Basic WebModeler preview + settings |
| 119 | +- Add Icon attribute (from Tree Table) |
| 120 | +- Add config for when context changes (reload rows?) |
| 121 | +- Column overflow (first column) |
| 122 | +- Header height |
| 123 | +- Left column lock issue with header. This is when locking the left column, it can get out of sync with the header. |
| 124 | +- Unit tests |
| 125 | + |
| 126 | +## License |
| 127 | + |
| 128 | +Apache 2 |
0 commit comments