Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-tree-select

Package Overview
Dependencies
Maintainers
2
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tree-select - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

3

HISTORY.md
# History
---
## 1.4.0 / 2016-03-14
- change `showAllChecked`/`showParentChecked` to `showCheckedStrategy`.
## 1.3.0 / 2016-03-14

@@ -5,0 +8,0 @@ - add `showAllChecked`/`showParentChecked` API.

24

lib/Select.js

@@ -81,2 +81,6 @@ 'use strict';

var SHOW_ALL = 'SHOW_ALL';
var SHOW_PARENT = 'SHOW_PARENT';
var SHOW_CHILD = 'SHOW_CHILD';
var Select = _react2['default'].createClass({

@@ -109,4 +113,3 @@ displayName: 'Select',

maxTagTextLength: _react.PropTypes.number,
showAllChecked: _react.PropTypes.bool,
showParentChecked: _react.PropTypes.bool,
showCheckedStrategy: _react.PropTypes.oneOf([SHOW_ALL, SHOW_PARENT, SHOW_CHILD]),
treeIcon: _react.PropTypes.bool,

@@ -139,4 +142,3 @@ treeLine: _react.PropTypes.bool,

notFoundContent: 'Not Found',
showAllChecked: false,
showParentChecked: false,
showCheckedStrategy: SHOW_CHILD,
treeIcon: false,

@@ -305,5 +307,5 @@ treeLine: false,

var checkedNodesPositions = info.checkedNodesPositions;
if (props.showAllChecked) {
if (props.showCheckedStrategy === SHOW_ALL) {
checkedNodes = checkedNodes;
} else if (props.showParentChecked) {
} else if (props.showCheckedStrategy === SHOW_PARENT) {
(function () {

@@ -520,5 +522,5 @@ var posArr = (0, _util.filterParentPosition)(checkedNodesPositions.map(function (itemObj) {

var checkedValues = [];
if (props.showAllChecked) {
if (props.showCheckedStrategy === SHOW_ALL) {
checkedValues = mapVal(checkedTreeNodes);
} else if (props.showParentChecked) {
} else if (props.showCheckedStrategy === SHOW_PARENT) {
(function () {

@@ -593,3 +595,3 @@ var posArr = (0, _util.filterParentPosition)(checkedTreeNodes.map(function (itemObj) {

}
if (props.showAllChecked || props.showParentChecked) {
if (props.showCheckedStrategy === SHOW_ALL || props.showCheckedStrategy === SHOW_PARENT) {
this.getDeselectedValue(selectedValue);

@@ -794,3 +796,7 @@ return;

Select.SHOW_ALL = SHOW_ALL;
Select.SHOW_PARENT = SHOW_PARENT;
Select.SHOW_CHILD = SHOW_CHILD;
exports['default'] = Select;
module.exports = exports['default'];
{
"name": "rc-tree-select",
"version": "1.3.0",
"version": "1.4.0",
"description": "tree-select ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

@@ -77,4 +77,3 @@ # rc-tree-select

|onSearch | called when input changed | function | - |
|showAllChecked | show all checked treeNodes (Include parent treeNode) when set treeCheckable | bool | false |
|showParentChecked | show checked treeNodes (Just show parent treeNode) when set treeCheckable | bool | false |
|showCheckedStrategy | `TreeSelect.SHOW_ALL`: show all checked treeNodes (Include parent treeNode). `TreeSelect.SHOW_PARENT`: show checked treeNodes (Just show parent treeNode). Default just show child. | enum{TreeSelect.SHOW_ALL | TreeSelect.SHOW_PARENT | TreeSelect.SHOW_CHILD } | TreeSelect.SHOW_CHILD |
|treeIcon | show tree icon | bool | false |

@@ -81,0 +80,0 @@ |treeLine | show tree line | bool | false |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc