
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
wodax-react-virtuoso-ex
Advanced tools
基于 react-virtuoso
, 做了部分扩展及性能提升。
export type TScrollingInfo = {
isScrolling: boolean,
scrollingTop: number
}
export type TDefaultPosInfo = {
top: number // scrollTop 值
left: number // scrollLeft 值
index: number // 指定索引位置的item渲染
maybeRenderItemCount: number // 要渲染展示的item数量
}
export interface VirtuosoProps {
totalCount: number
overscan?: number
topItems?: number
footer?: () => ReactElement
item: (index: number) => ReactElement
computeItemKey?: (index: number) => number
itemHeight?: number
startReached?: ({touchMoveDistance, scrollTop}:{touchMoveDistance: number, scrollTop:number}) => void // 新增下拉检测
endReached?: (index: number) => void
scrollEventChange?: (e: Event) => void // 新增
scrollingStateChange?: (info: TScrollingInfo) => void // 变更
quickScrollingStateChange?: (isRunning: boolean) => void // 新增
itemsRendered?: TSubscriber<ListItem[]>
itemsLastRendered?: TSubscriber<ListItem[]> // 新增
totalListHeightChanged?: TSubscriber<number>
style?: CSSProperties
className?: string
initialItemCount?: number
initialScrollToPos?: TDefaultPosInfo // 新增
ScrollContainer?: TScrollContainer
FooterContainer?: TFooterContainer
ListContainer?: TListContainer
ItemContainer?: TItemContainer
}
参见:https://virtuoso.dev/virtuoso-api-reference/
interface TScrollLocationWithAlign {
index: number
align: 'start' | 'center' | 'end'
}
export type TScrollLocation = number | TScrollLocationWithAlign
// 滑动/滚动到索引项
function scrollToIndex(location: TScrollLocation);
type ScrollBehavior = "auto" | "smooth";
interface ScrollOptions {
behavior?: ScrollBehavior;
}
interface ScrollToOptions extends ScrollOptions {
left?: number;
top?: number;
}
// 滑动/滚动到坐标
function scrollToPos(location: ScrollToOptions)
注意: 使用scrollToPos会根据behavior的行为来处理滑动及滚动的效果。处理完成后,恢复初始的style状态
sunzhifeng @sunzhifeng
MIT
FAQs
Unknown package
The npm package wodax-react-virtuoso-ex receives a total of 0 weekly downloads. As such, wodax-react-virtuoso-ex popularity was classified as not popular.
We found that wodax-react-virtuoso-ex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.