bvaughn/react-virtualized-auto-sizer
关于
react-virtualized 中 AutoSizer 组件的独立版本
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
react-virtualized-auto-sizer: Measures the available width and height of an HTMLElement and passes those values as props to a Child component. Refer to the docs for usage examples.
[!NOTE] This package began as a fork of the
AutoSizercomponent from react-virtualized, and was intended for use with earlier versions of react-window. More recent versions ofreact-windowuseResizeObservernatively and do not require this package.
If you like this project, 🎉 become a sponsor or ☕ buy me a coffee
Install
npm install --save react-virtualized-auto-sizer
FAQs
Frequently asked questions can be found here.
Documentation
Components
AutoSizer
Measures the available width and height of its parent HTMLElement and passes those values as width and height props to its children.
ℹ️ This component began as a fork of the javascript-detect-element-resize package.
Required props
None
Optional props
| Name | Description |
|---|---|
| box | Corresponds to the
|
| className | Class name to be applied to the auto-sizer |
| data-testid | Test id attribute to interop with frameworks like Testing Library. |
| id | Unique id attribute to attach to root DOM element. |
| nonce | Nonce used for inline |
| onResize | Optional callback notified after a resize.
|
| style | Style properties to be applied to the auto-sizer |
| tagName | Optional HTML tag name for root HTMLElement; defaults to |
| Child | Child component to be passed the available width and height values as props. ❌ This prop has been deprecated. Use the |
| ChildComponent | Child component to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
| renderProp | Render prop to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
探索相关项目
加载中…