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

rc-tree

Package Overview
Dependencies
Maintainers
10
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tree - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1

1

es/Tree.d.ts

@@ -178,2 +178,3 @@ import * as React from 'react';

delayedDragEnterLogic: Record<Key, number>;
loadingRetryTimes: Record<Key, number>;
state: TreeState;

@@ -180,0 +181,0 @@ dragStartMousePosition: any;

@@ -24,2 +24,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

import DropIndicator from './DropIndicator';
var MAX_RETRY_TIMES = 10;

@@ -43,2 +44,3 @@ var Tree = /*#__PURE__*/function (_React$Component) {

_this.delayedDragEnterLogic = void 0;
_this.loadingRetryTimes = {};
_this.state = {

@@ -563,3 +565,4 @@ keyEntities: {},

_this.onNodeLoad = function (treeNode) {
return new Promise(function (resolve, reject) {
var key = treeNode.key;
var loadPromise = new Promise(function (resolve, reject) {
// We need to get the latest state of loading/loaded keys

@@ -574,3 +577,2 @@ _this.setState(function (_ref) {

onLoad = _this$props5.onLoad;
var key = treeNode.key;

@@ -611,4 +613,18 @@ if (!loadData || loadedKeys.indexOf(key) !== -1 || loadingKeys.indexOf(key) !== -1) {

};
});
}); // If exceed max retry times, we give up retry
_this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;
if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {
var currentLoadedKeys = _this.state.loadedKeys;
warning(false, 'Retry for `loadData` many times but still failed. No more retry.');
_this.setUncontrolledState({
loadedKeys: arrAdd(currentLoadedKeys, key)
});
resolve();
}
reject(e);

@@ -620,3 +636,6 @@ });

});
});
}); // Not care warning if we ignore this
loadPromise.catch(function () {});
return loadPromise;
};

@@ -623,0 +642,0 @@

@@ -178,2 +178,3 @@ import * as React from 'react';

delayedDragEnterLogic: Record<Key, number>;
loadingRetryTimes: Record<Key, number>;
state: TreeState;

@@ -180,0 +181,0 @@ dragStartMousePosition: any;

@@ -56,2 +56,4 @@ "use strict";

// Fully accessibility support
var MAX_RETRY_TIMES = 10;
var Tree = /*#__PURE__*/function (_React$Component) {

@@ -74,2 +76,3 @@ (0, _inherits2.default)(Tree, _React$Component);

_this.delayedDragEnterLogic = void 0;
_this.loadingRetryTimes = {};
_this.state = {

@@ -590,3 +593,4 @@ keyEntities: {},

_this.onNodeLoad = function (treeNode) {
return new Promise(function (resolve, reject) {
var key = treeNode.key;
var loadPromise = new Promise(function (resolve, reject) {
// We need to get the latest state of loading/loaded keys

@@ -601,3 +605,2 @@ _this.setState(function (_ref) {

onLoad = _this$props5.onLoad;
var key = treeNode.key;

@@ -638,4 +641,18 @@ if (!loadData || loadedKeys.indexOf(key) !== -1 || loadingKeys.indexOf(key) !== -1) {

};
});
}); // If exceed max retry times, we give up retry
_this.loadingRetryTimes[key] = (_this.loadingRetryTimes[key] || 0) + 1;
if (_this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {
var currentLoadedKeys = _this.state.loadedKeys;
(0, _warning.default)(false, 'Retry for `loadData` many times but still failed. No more retry.');
_this.setUncontrolledState({
loadedKeys: (0, _util.arrAdd)(currentLoadedKeys, key)
});
resolve();
}
reject(e);

@@ -647,3 +664,6 @@ });

});
});
}); // Not care warning if we ignore this
loadPromise.catch(function () {});
return loadPromise;
};

@@ -650,0 +670,0 @@

2

package.json
{
"name": "rc-tree",
"version": "5.2.0",
"version": "5.2.1",
"description": "tree ui component for react",

@@ -5,0 +5,0 @@ "engines": {

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