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.47.4 to 7.47.5

4

es/hooks/useSticky.js

@@ -21,4 +21,4 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";

var container = getContainer() || defaultContainer;
var isSticky = !!sticky;
return React.useMemo(function () {
var isSticky = !!sticky;
return {

@@ -32,3 +32,3 @@ isSticky: isSticky,

};
}, [offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
}, [isSticky, offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
}

@@ -60,3 +60,3 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

import ColumnGroup from "./sugar/ColumnGroup";
import { getColumnsKey, validateValue } from "./utils/valueUtil";
import { getColumnsKey, validateValue, validNumberValue } from "./utils/valueUtil";
import { getDOM } from "rc-util/es/Dom/findDOMNode";

@@ -201,5 +201,3 @@ export var DEFAULT_PREFIX = 'rc-table';

key = config.key;
// * 考虑top为0的情况
if (top || top === 0) {
if (validNumberValue(top)) {
var _scrollBodyRef$curren;

@@ -206,0 +204,0 @@ (_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 || _scrollBodyRef$curren.scrollTo({

@@ -9,1 +9,2 @@ /// <reference types="react" />

export declare function validateValue<T>(val: T): boolean;
export declare function validNumberValue(value: any): boolean;

@@ -26,2 +26,5 @@ var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY';

return val !== null && val !== undefined;
}
export function validNumberValue(value) {
return typeof value === 'number' && !Number.isNaN(value);
}

@@ -31,4 +31,4 @@ "use strict";

var container = getContainer() || defaultContainer;
var isSticky = !!sticky;
return React.useMemo(function () {
var isSticky = !!sticky;
return {

@@ -42,3 +42,3 @@ isSticky: isSticky,

};
}, [offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
}, [isSticky, offsetScroll, offsetHeader, offsetSummary, prefixCls, container]);
}

@@ -211,5 +211,3 @@ "use strict";

key = config.key;
// * 考虑top为0的情况
if (top || top === 0) {
if ((0, _valueUtil.validNumberValue)(top)) {
var _scrollBodyRef$curren;

@@ -216,0 +214,0 @@ (_scrollBodyRef$curren = scrollBodyRef.current) === null || _scrollBodyRef$curren === void 0 || _scrollBodyRef$curren.scrollTo({

@@ -9,1 +9,2 @@ /// <reference types="react" />

export declare function validateValue<T>(val: T): boolean;
export declare function validNumberValue(value: any): boolean;

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

exports.getColumnsKey = getColumnsKey;
exports.validNumberValue = validNumberValue;
exports.validateValue = validateValue;

@@ -34,2 +35,5 @@ var INTERNAL_KEY_PREFIX = 'RC_TABLE_KEY';

return val !== null && val !== undefined;
}
function validNumberValue(value) {
return typeof value === 'number' && !Number.isNaN(value);
}
{
"name": "rc-table",
"version": "7.47.4",
"version": "7.47.5",
"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