Socket
Socket
Sign inDemoInstall

rc-tree

Package Overview
Dependencies
Maintainers
11
Versions
306
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.4.2 to 5.4.3

2

es/NodeList.js

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

function itemKey(item) {
var key = item.data.key,
var key = item.key,
pos = item.pos;

@@ -67,0 +67,0 @@ return getKey(key, pos);

@@ -185,3 +185,5 @@ import * as React from 'react';

listRef: React.RefObject<NodeListRef>;
componentDidUpdate(_: Readonly<TreeProps<TreeDataType>>, prevState: Readonly<TreeState<TreeDataType>>): void;
componentDidMount(): void;
componentDidUpdate(): void;
onUpdated(): void;
componentWillUnmount(): void;

@@ -188,0 +190,0 @@ static getDerivedStateFromProps(props: TreeProps, prevState: TreeState): Partial<TreeState<DataNode>>;

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

if (newActiveKey !== null) {
_this.scrollTo({
key: newActiveKey
});
}
if (onActiveChange) {

@@ -962,10 +968,26 @@ onActiveChange(newActiveKey);

_createClass(Tree, [{
key: "componentDidMount",
value: function componentDidMount() {
this.onUpdated();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(_, prevState) {
var activeKey = this.state.activeKey;
value: function componentDidUpdate() {
this.onUpdated();
}
}, {
key: "onUpdated",
value: function onUpdated() {
var activeKey = this.props.activeKey;
if (activeKey !== null && prevState.activeKey !== activeKey) {
this.scrollTo({
key: activeKey
if (activeKey !== undefined && activeKey !== this.state.activeKey) {
this.setState({
activeKey: activeKey
});
if (activeKey !== null) {
this.scrollTo({
key: activeKey
});
}
}

@@ -1239,7 +1261,2 @@ }

newState.loadedKeys = props.loadedKeys;
} // ================== activeKey ==================
if (needSync('activeKey')) {
newState.activeKey = props.activeKey;
}

@@ -1246,0 +1263,0 @@

@@ -82,3 +82,3 @@ "use strict";

function itemKey(item) {
var key = item.data.key,
var key = item.key,
pos = item.pos;

@@ -85,0 +85,0 @@ return (0, _treeUtil.getKey)(key, pos);

@@ -185,3 +185,5 @@ import * as React from 'react';

listRef: React.RefObject<NodeListRef>;
componentDidUpdate(_: Readonly<TreeProps<TreeDataType>>, prevState: Readonly<TreeState<TreeDataType>>): void;
componentDidMount(): void;
componentDidUpdate(): void;
onUpdated(): void;
componentWillUnmount(): void;

@@ -188,0 +190,0 @@ static getDerivedStateFromProps(props: TreeProps, prevState: TreeState): Partial<TreeState<DataNode>>;

@@ -825,2 +825,8 @@ "use strict";

if (newActiveKey !== null) {
_this.scrollTo({
key: newActiveKey
});
}
if (onActiveChange) {

@@ -991,10 +997,26 @@ onActiveChange(newActiveKey);

(0, _createClass2.default)(Tree, [{
key: "componentDidMount",
value: function componentDidMount() {
this.onUpdated();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(_, prevState) {
var activeKey = this.state.activeKey;
value: function componentDidUpdate() {
this.onUpdated();
}
}, {
key: "onUpdated",
value: function onUpdated() {
var activeKey = this.props.activeKey;
if (activeKey !== null && prevState.activeKey !== activeKey) {
this.scrollTo({
key: activeKey
if (activeKey !== undefined && activeKey !== this.state.activeKey) {
this.setState({
activeKey: activeKey
});
if (activeKey !== null) {
this.scrollTo({
key: activeKey
});
}
}

@@ -1267,7 +1289,2 @@ }

newState.loadedKeys = props.loadedKeys;
} // ================== activeKey ==================
if (needSync('activeKey')) {
newState.activeKey = props.activeKey;
}

@@ -1274,0 +1291,0 @@

{
"name": "rc-tree",
"version": "5.4.2",
"version": "5.4.3",
"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