intelligent-tree-select
Advanced tools
Comparing version 0.10.8 to 0.10.9
@@ -290,8 +290,7 @@ "use strict"; | ||
result = result.concat(data); | ||
result = result.concat(this._simplifyData(data[childrenKey])); | ||
const childrenArr = (0, _Utils.sanitizeArray)(data[childrenKey]); | ||
if (data[childrenKey]) { | ||
data[childrenKey] = Array.isArray(data[childrenKey]) | ||
? data[childrenKey].map((xdata) => xdata[valueKey]) | ||
: data[childrenKey][valueKey]; | ||
if (childrenArr.length > 0) { | ||
result = result.concat(this._simplifyData(childrenArr)); | ||
data[childrenKey] = childrenArr.map((xdata) => xdata[valueKey]); | ||
} | ||
@@ -298,0 +297,0 @@ } |
@@ -48,3 +48,3 @@ "use strict"; | ||
function monotonicAssign(target, ...sources) { | ||
// Does not cover empty arrays | ||
// Note that this does not handle empty arrays, only attributes with explicitly undefined values | ||
return Object.assign( | ||
@@ -51,0 +51,0 @@ target, |
@@ -241,3 +241,3 @@ "use strict"; | ||
//If so, set the correct expanded value from the state options | ||
//It is needed to check it's full path to determine whether it is the correct option | ||
//It is needed to check its full path to determine whether it is the correct option | ||
@@ -244,0 +244,0 @@ let existingOption = this._findOption(this.state.options, option); |
@@ -6,3 +6,3 @@ { | ||
"description": "React tree select component based on [react-select](https://github.com/JedWatson/react-select#react-select) with [react-window](https://github.com/bvaughn/react-window)-based rendering of options.", | ||
"version": "0.10.8", | ||
"version": "0.10.9", | ||
"bugs": { | ||
@@ -9,0 +9,0 @@ "url": "https://github.com/lecbyjak/intelligent-tree-select/issues" |
@@ -195,7 +195,6 @@ import React, {Component} from "react"; | ||
result = result.concat(data); | ||
result = result.concat(this._simplifyData(data[childrenKey])); | ||
if (data[childrenKey]) { | ||
data[childrenKey] = Array.isArray(data[childrenKey]) | ||
? data[childrenKey].map((xdata) => xdata[valueKey]) | ||
: data[childrenKey][valueKey]; | ||
const childrenArr = sanitizeArray(data[childrenKey]); | ||
if (childrenArr.length > 0) { | ||
result = result.concat(this._simplifyData(childrenArr)); | ||
data[childrenKey] = childrenArr.map((xdata) => xdata[valueKey]); | ||
} | ||
@@ -202,0 +201,0 @@ } |
@@ -127,3 +127,3 @@ import React, {Component} from "react"; | ||
//If so, set the correct expanded value from the state options | ||
//It is needed to check it's full path to determine whether it is the correct option | ||
//It is needed to check its full path to determine whether it is the correct option | ||
let existingOption = this._findOption(this.state.options, option); | ||
@@ -130,0 +130,0 @@ if (existingOption) { |
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
99541
2471