treetabular
Advanced tools
Comparing version 3.1.3 to 3.2.0
## treetabular | ||
3.2.0 / 2017-02-25 | ||
================== | ||
* Feature - Add `indent` prop to `tree.toggleChildren`. Set to `false` to default indentation behavior. #8 | ||
3.1.3 / 2017-02-22 | ||
@@ -4,0 +9,0 @@ ================== |
@@ -7,2 +7,6 @@ 'use strict'; | ||
var _get2 = require('lodash/get'); | ||
var _get3 = _interopRequireDefault(_get2); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
@@ -72,6 +76,8 @@ | ||
var hasAutomaticIndentation = (0, _get3.default)(props, 'indent', true); | ||
return _react2.default.createElement( | ||
'div', | ||
_extends({ | ||
style: { paddingLeft: level + 'em' } | ||
style: !!hasAutomaticIndentation && { paddingLeft: level + 'em' } | ||
// toggling children with a doubleClick would provide better UX | ||
@@ -78,0 +84,0 @@ // since toggling with a click makes it difficult to select each item. |
{ | ||
"name": "treetabular", | ||
"version": "3.1.3", | ||
"version": "3.2.0", | ||
"description": "Tree utilities", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -126,3 +126,4 @@ [![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) | ||
Makes it possible to toggle node children through a user interface. | ||
Makes it possible to toggle node children through a user interface. | ||
Pass `"indent":false` inside `props` object if you want to disable automatic indentation. | ||
@@ -129,0 +130,0 @@ The default implementation of `getIndex(rowData)` depends on [resolve.resolve](https://www.npmjs.com/package/table-resolver#resolveresolve) as it looks for index of the row to toggle based on that. This can be customized through. |
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
49694
704
335