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

rc-dock

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-dock - npm Package Compare versions

Comparing version 2.5.4 to 2.5.5

2

lib/DockTabPane.d.ts

@@ -12,3 +12,3 @@ import React from 'react';

tab: React.ReactNode;
id?: string;
cacheId?: string;
cached: boolean;

@@ -15,0 +15,0 @@ }

@@ -17,5 +17,5 @@ "use strict";

updateCache() {
const { cached, children, id } = this.props;
const { cached, children, cacheId } = this.props;
if (this._cache) {
if (!cached || id !== this._cache.id) {
if (!cached || cacheId !== this._cache.id) {
TabPaneCache.remove(this._cache.id, this);

@@ -26,3 +26,3 @@ this._cache = null;

if (cached && this._ref) {
this._cache = TabPaneCache.create(id, this);
this._cache = TabPaneCache.create(cacheId, this);
this._ref.appendChild(this._cache.div);

@@ -33,3 +33,3 @@ this._cache.update(children);

render() {
const { id, className, active, forceRender, rootPrefixCls, style, children, placeholder, cached } = this.props;
const { cacheId, className, active, forceRender, rootPrefixCls, style, children, placeholder, cached } = this.props;
this._isActived = this._isActived || active;

@@ -54,3 +54,3 @@ const prefixCls = `${rootPrefixCls}-tabpane`;

let getRef = cached ? this.getRef : null;
return (react_1.default.createElement("div", { ref: getRef, style: style, role: "tabpanel", "aria-hidden": active ? 'false' : 'true', className: cls, id: id }, renderChildren));
return (react_1.default.createElement("div", { ref: getRef, style: style, role: "tabpanel", "aria-hidden": active ? 'false' : 'true', className: cls, id: cacheId }, renderChildren));
}

@@ -131,5 +131,5 @@ componentDidMount() {

updateCache() {
const { cached, children, id } = this.props;
const { cached, children, cacheId } = this.props;
if (this._cache) {
if (!cached || id !== this._cache.id) {
if (!cached || cacheId !== this._cache.id) {
TabPaneCache.remove(this._cache.id, this);

@@ -140,3 +140,3 @@ this._cache = null;

if (cached && this._ref) {
this._cache = TabPaneCache.create(id, this);
this._cache = TabPaneCache.create(cacheId, this);
this._ref.appendChild(this._cache.div);

@@ -143,0 +143,0 @@ if (contextType) {

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

else {
return (react_1.default.createElement(DockTabPane_1.default, { key: id, id: id, cached: cached, tab: tab }, content));
return (react_1.default.createElement(DockTabPane_1.default, { key: id, cacheId: id, cached: cached, tab: tab }, content));
}

@@ -141,0 +141,0 @@ }

{
"name": "rc-dock",
"version": "2.5.4",
"version": "2.5.5",
"description": "dock layout for react component",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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