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

rc-table

Package Overview
Dependencies
Maintainers
9
Versions
440
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-table - npm Package Compare versions

Comparing version 7.34.0 to 7.34.1

2

es/Body/BodyRow.d.ts
import * as React from 'react';
import useRowInfo from '../hooks/useRowInfo';
import type { ColumnType, CustomizeComponent, GetRowKey } from '../interface';
import useRowInfo from '../hooks/useRowInfo';
export interface BodyRowProps<RecordType> {

@@ -5,0 +5,0 @@ record: RecordType;

import _extends from "@babel/runtime/helpers/esm/extends";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import classNames from 'classnames';

@@ -9,4 +8,4 @@ import * as React from 'react';

import devRenderTimes from "../hooks/useRenderTimes";
import useRowInfo from "../hooks/useRowInfo";
import ExpandedRow from "./ExpandedRow";
import useRowInfo from "../hooks/useRowInfo";
// ==================================================================================

@@ -84,14 +83,9 @@ // == getCellProps ==

rowSupportExpand = rowInfo.rowSupportExpand;
var _React$useState = React.useState(false),
_React$useState2 = _slicedToArray(_React$useState, 2),
expandRended = _React$useState2[0],
setExpandRended = _React$useState2[1];
// Force render expand row if expanded before
var expandedRef = React.useRef(false);
expandedRef.current || (expandedRef.current = expanded);
if (process.env.NODE_ENV !== 'production') {
devRenderTimes(props);
}
React.useEffect(function () {
if (expanded) {
setExpandRended(true);
}
}, [expanded]);

@@ -134,3 +128,3 @@ // ======================== Base tr row ========================

var expandRowNode;
if (rowSupportExpand && (expandRended || expanded)) {
if (rowSupportExpand && (expandedRef.current || expanded)) {
var expandContent = expandedRowRender(record, index, indent + 1, expanded);

@@ -137,0 +131,0 @@ var computedExpandedRowClassName = expandedRowClassName && expandedRowClassName(record, index, indent);

import * as React from 'react';
import useRowInfo from '../hooks/useRowInfo';
import type { ColumnType, CustomizeComponent, GetRowKey } from '../interface';
import useRowInfo from '../hooks/useRowInfo';
export interface BodyRowProps<RecordType> {

@@ -5,0 +5,0 @@ record: RecordType;

@@ -12,3 +12,2 @@ "use strict";

var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _classnames = _interopRequireDefault(require("classnames"));

@@ -19,4 +18,4 @@ var React = _interopRequireWildcard(require("react"));

var _useRenderTimes = _interopRequireDefault(require("../hooks/useRenderTimes"));
var _useRowInfo = _interopRequireDefault(require("../hooks/useRowInfo"));
var _ExpandedRow = _interopRequireDefault(require("./ExpandedRow"));
var _useRowInfo = _interopRequireDefault(require("../hooks/useRowInfo"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -96,14 +95,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

rowSupportExpand = rowInfo.rowSupportExpand;
var _React$useState = React.useState(false),
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
expandRended = _React$useState2[0],
setExpandRended = _React$useState2[1];
// Force render expand row if expanded before
var expandedRef = React.useRef(false);
expandedRef.current || (expandedRef.current = expanded);
if (process.env.NODE_ENV !== 'production') {
(0, _useRenderTimes.default)(props);
}
React.useEffect(function () {
if (expanded) {
setExpandRended(true);
}
}, [expanded]);

@@ -146,3 +140,3 @@ // ======================== Base tr row ========================

var expandRowNode;
if (rowSupportExpand && (expandRended || expanded)) {
if (rowSupportExpand && (expandedRef.current || expanded)) {
var expandContent = expandedRowRender(record, index, indent + 1, expanded);

@@ -149,0 +143,0 @@ var computedExpandedRowClassName = expandedRowClassName && expandedRowClassName(record, index, indent);

{
"name": "rc-table",
"version": "7.34.0",
"version": "7.34.1",
"description": "table 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