treetabular
Advanced tools
Comparing version 2.0.2 to 2.1.0
## treetabular | ||
2.1.0 / 2017-02-06 | ||
================== | ||
* Feature - Add `tree.fixOrder` - If children in your rows don't follow their parents you can use that helper method so they will be moved into right place. #2 | ||
2.0.2 / 2017-02-03 | ||
@@ -4,0 +9,0 @@ ================== |
@@ -133,2 +133,11 @@ 'use strict'; | ||
var _fixOrder = require('./fix-order'); | ||
Object.defineProperty(exports, 'fixOrder', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_fixOrder).default; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
{ | ||
"name": "treetabular", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Tree utilities", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -32,3 +32,3 @@ [![build status](https://secure.travis-ci.org/reactabular/treetabular.svg)](http://travis-ci.org/reactabular/treetabular) [![bitHound Score](https://www.bithound.io/github/reactabular/treetabular/badges/score.svg)](https://www.bithound.io/github/reactabular/treetabular) [![codecov](https://codecov.io/gh/reactabular/treetabular/branch/master/graph/badge.svg)](https://codecov.io/gh/reactabular/treetabular) | ||
If there's a `parent` relation, the children must follow their parent right after it. | ||
If there's a `parent` relation, the children must follow their parent right after it (you might use `fixOrder` helper function if your data does not meet that criteria). | ||
@@ -131,2 +131,10 @@ > You can find suggested default styling for the package at `style.css` in the package root. | ||
### Helpers | ||
**`tree.fixOrder = ({ parentField = 'parent', idField = 'id' }) => (rows) => [<rows in correct order>]`** | ||
If children in your rows don't follow their parents you can use that helper method so they will be moved into right place. | ||
Basically it converts `[ parent, x, y, z, children ]` into `[ parent, children, x, y, z ]`. | ||
## Example | ||
@@ -133,0 +141,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
47489
21
690
337