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

@ant-design/pro-list

Package Overview
Dependencies
Maintainers
6
Versions
439
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/pro-list

🏆 Use Ant Design List like a Pro!

  • 2.6.2
  • beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
62K
decreased by-2.63%
Maintainers
6
Weekly downloads
 
Created
Source

@ant-design/pro-list

🏆 Use Ant Design List like a Pro!

ProList (高级列表)

ProList 在 antd 的 list 支持了一些功能,比如 多选,展开等功能,使用体验贴近 table。

何时使用

在完成一个标准的列表时即可使用。

API

ProList

ProList 与 antd 的 List 相比,主要增加了 rowSelection 和 expandable 来支持选中与筛选

参数说明类型默认值
rowSelection与 antd 相同的配置object |booleanfalse
expandable与 antd 相同的配置object | false-
showActions何时展示 actions,CardList 模式下不生效'hover' | 'always'always
rowKey行的 key,一般是行 idstring | (row,index)=>string"id"
renderItem现在的 renderItem 需要返回 ProList.Item 的 props,而不是 domItemProps-
listRenderItem这是 antd 的 renderItem 的别名(row,index)=> Node-

ProList.Item

如果你的 dataSource 包含 children,我们会将其打平传入到 renderItem 中,但是包含 children 的项会转化了 group 的样式,只支持 title 和 actions 的属性。

参数说明类型默认值
type列表项的预设样式new | top-
title列表项的主标题ReactNode-
subTitle列表项的副标题ReactNode-
checkbox列表的选择框React.ReactNode-
loading列表项是否在加载中React.ReactNode-
avatar列表项的头像AvatarProps | string-
actions操作列表项React.ReactNode[]-
description列表项的描述,与 title 不在一行React.ReactNode[]-
expandedRowClassName额外展开的 cssstring-
expand列表项是否展开boolean-
onExpand列表项展开收起的回调(expand: boolean) => void-
expandable列表项展开配置object-

Keywords

FAQs

Package last updated on 14 Nov 2024

Did you know?

Socket

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.

Install

Related posts

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