rc-virtual-list
Advanced tools
Comparing version 3.11.5 to 3.12.0
import * as React from 'react'; | ||
import type { InnerProps } from './Filler'; | ||
import type { ScrollPos, ScrollTarget } from './hooks/useScrollTo'; | ||
import type { ExtraRenderInfo, RenderFunc } from './interface'; | ||
import type { ScrollBarDirectionType } from './ScrollBar'; | ||
import type { RenderFunc, ExtraRenderInfo } from './interface'; | ||
import type { ScrollPos, ScrollTarget } from './hooks/useScrollTo'; | ||
export interface ScrollInfo { | ||
@@ -7,0 +7,0 @@ x: number; |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
@@ -8,20 +8,20 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; | ||
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"]; | ||
import classNames from 'classnames'; | ||
import ResizeObserver from 'rc-resize-observer'; | ||
import { useEvent } from 'rc-util'; | ||
import useLayoutEffect from "rc-util/es/hooks/useLayoutEffect"; | ||
import * as React from 'react'; | ||
import { useRef, useState } from 'react'; | ||
import { flushSync } from 'react-dom'; | ||
import classNames from 'classnames'; | ||
import ResizeObserver from 'rc-resize-observer'; | ||
import Filler from "./Filler"; | ||
import ScrollBar from "./ScrollBar"; | ||
import useChildren from "./hooks/useChildren"; | ||
import useHeights from "./hooks/useHeights"; | ||
import useScrollTo from "./hooks/useScrollTo"; | ||
import useDiffItem from "./hooks/useDiffItem"; | ||
import useFrameWheel from "./hooks/useFrameWheel"; | ||
import { useGetSize } from "./hooks/useGetSize"; | ||
import useHeights from "./hooks/useHeights"; | ||
import useMobileTouchMove from "./hooks/useMobileTouchMove"; | ||
import useOriginScroll from "./hooks/useOriginScroll"; | ||
import useLayoutEffect from "rc-util/es/hooks/useLayoutEffect"; | ||
import useScrollTo from "./hooks/useScrollTo"; | ||
import ScrollBar from "./ScrollBar"; | ||
import { getSpinSize } from "./utils/scrollbarUtil"; | ||
import { useEvent } from 'rc-util'; | ||
import { useGetSize } from "./hooks/useGetSize"; | ||
var EMPTY_DATA = []; | ||
@@ -258,5 +258,5 @@ var ScrollStyle = { | ||
var lastVirtualScrollInfoRef = useRef(getVirtualScrollInfo()); | ||
var triggerScroll = useEvent(function () { | ||
var triggerScroll = useEvent(function (params) { | ||
if (onVirtualScroll) { | ||
var nextInfo = getVirtualScrollInfo(); | ||
var nextInfo = _objectSpread(_objectSpread({}, getVirtualScrollInfo()), params); | ||
@@ -357,4 +357,6 @@ // Trigger when offset changed | ||
if (scrollWidth) { | ||
setOffsetLeft(function (left) { | ||
return keepInHorizontalRange(left); | ||
var newOffsetLeft = keepInHorizontalRange(offsetLeft); | ||
setOffsetLeft(newOffsetLeft); | ||
triggerScroll({ | ||
x: newOffsetLeft | ||
}); | ||
@@ -361,0 +363,0 @@ } |
import * as React from 'react'; | ||
import type { InnerProps } from './Filler'; | ||
import type { ScrollPos, ScrollTarget } from './hooks/useScrollTo'; | ||
import type { ExtraRenderInfo, RenderFunc } from './interface'; | ||
import type { ScrollBarDirectionType } from './ScrollBar'; | ||
import type { RenderFunc, ExtraRenderInfo } from './interface'; | ||
import type { ScrollPos, ScrollTarget } from './hooks/useScrollTo'; | ||
export interface ScrollInfo { | ||
@@ -7,0 +7,0 @@ x: number; |
@@ -11,25 +11,25 @@ "use strict"; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _rcResizeObserver = _interopRequireDefault(require("rc-resize-observer")); | ||
var _rcUtil = require("rc-util"); | ||
var _useLayoutEffect = _interopRequireDefault(require("rc-util/lib/hooks/useLayoutEffect")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var React = _react; | ||
var _reactDom = require("react-dom"); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _rcResizeObserver = _interopRequireDefault(require("rc-resize-observer")); | ||
var _Filler = _interopRequireDefault(require("./Filler")); | ||
var _ScrollBar = _interopRequireDefault(require("./ScrollBar")); | ||
var _useChildren = _interopRequireDefault(require("./hooks/useChildren")); | ||
var _useHeights3 = _interopRequireDefault(require("./hooks/useHeights")); | ||
var _useScrollTo = _interopRequireDefault(require("./hooks/useScrollTo")); | ||
var _useDiffItem3 = _interopRequireDefault(require("./hooks/useDiffItem")); | ||
var _useFrameWheel3 = _interopRequireDefault(require("./hooks/useFrameWheel")); | ||
var _useGetSize = require("./hooks/useGetSize"); | ||
var _useHeights3 = _interopRequireDefault(require("./hooks/useHeights")); | ||
var _useMobileTouchMove = _interopRequireDefault(require("./hooks/useMobileTouchMove")); | ||
var _useOriginScroll = _interopRequireDefault(require("./hooks/useOriginScroll")); | ||
var _useLayoutEffect = _interopRequireDefault(require("rc-util/lib/hooks/useLayoutEffect")); | ||
var _useScrollTo = _interopRequireDefault(require("./hooks/useScrollTo")); | ||
var _ScrollBar = _interopRequireDefault(require("./ScrollBar")); | ||
var _scrollbarUtil = require("./utils/scrollbarUtil"); | ||
var _rcUtil = require("rc-util"); | ||
var _useGetSize = require("./hooks/useGetSize"); | ||
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles"]; | ||
@@ -267,5 +267,5 @@ var EMPTY_DATA = []; | ||
var lastVirtualScrollInfoRef = (0, _react.useRef)(getVirtualScrollInfo()); | ||
var triggerScroll = (0, _rcUtil.useEvent)(function () { | ||
var triggerScroll = (0, _rcUtil.useEvent)(function (params) { | ||
if (onVirtualScroll) { | ||
var nextInfo = getVirtualScrollInfo(); | ||
var nextInfo = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, getVirtualScrollInfo()), params); | ||
@@ -366,4 +366,6 @@ // Trigger when offset changed | ||
if (scrollWidth) { | ||
setOffsetLeft(function (left) { | ||
return keepInHorizontalRange(left); | ||
var newOffsetLeft = keepInHorizontalRange(offsetLeft); | ||
setOffsetLeft(newOffsetLeft); | ||
triggerScroll({ | ||
x: newOffsetLeft | ||
}); | ||
@@ -370,0 +372,0 @@ } |
{ | ||
"name": "rc-virtual-list", | ||
"version": "3.11.5", | ||
"version": "3.12.0", | ||
"description": "React Virtual List Component", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
130278
3219