Skip to content

Conversation

@renovate-sh-app
Copy link
Contributor

This PR contains the following updates:

Package Change Age Confidence
react-virtualized-auto-sizer (source) 1.0.262.0.2 age confidence

Release Notes

bvaughn/react-virtualized-auto-sizer (react-virtualized-auto-sizer)

v2.0.2

Compare Source

  • Updated README docs

v2.0.1

Compare Source

  • #​104: Separate renderProp and ChildComponent props.

v2.0.0

Compare Source

Version 2 simplifies the API and improves TypeScript support.

Migrating from 1.x to 2.x

Refer to the docs for a complete list of props and API methods. Below are some examples of migrating from version 1 to 2, but first a couple of potential questions:

Q: Why were the defaultHeight and defaultWidth props removed?
A: The more idiomatic way of setting default width and height is to use default parameters; see below for examples.
Q: Why were the disableHeight and disableWidth props removed?
A: These props interfered with the TypeScript inference (see issue #​100). `React.memo` can be used to achieve this behavior instead; see below for examples.
Q: Why was the doNotBailOutOnEmptyChildren prop removed?
A: This component no longer bails out on empty children; this decision is left up to the child component.
Q: Does AutoSizer support CSS transitions/animations?
A: To an extent, but as with ResizeObserver, there is no event dispatched when a CSS transition is complete (see issue #​99). As a potential workaround, the box property can be used to report unscaled size; see below for examples.
Basic usage
// Version 1
<AutoSizer>
  {({ height, width }) => {
    // ...
  }}
</AutoSizer>

// Version 2
\<AutoSizer
Child={({ height, width }) => {
// ...
}}
/>
Default width/height for server rendered content
// Version 1
<AutoSizer defaultWidth={800} defaultHeight={600} {...rest} />

// Version 2
<AutoSizer
  Child={({ height = 600, width = 800 }) => {
    // ...
  }}
/>
Width only (or height only)
// Version 1
<AutoSizer disableWidth {...rest} />

// Version 2
<AutoSizer Child={MemoizedChild} />

const MemoizedChild = memo(
  Child,
  function arePropsEqual(oldProps, newProps) {
    return oldProps.height === newProps.height;
  }
);

1.0.26

  • Changed width and height values to be based om getBoundingClientRect rather than offsetWidth and offsetHeight (which are integers and can cause rounding/flickering problems in some cases).

1.0.25

  • Dependencies updated to include React 19

1.0.24

  • Add optional doNotBailOutOnEmptyChildren prop to AutoSizer to override default behavior of not rendering children when either width or height are 0

1.0.23

  • Bugfix: Use ResizeObserver global from parentNode realm to support case with multiple realms (#​82)

1.0.22

  • Bugfix: Treat empty-string padding values as 0

1.0.21

  • TypeScript change only; AutoSizer return type changed from ReactElement to ReactNode

1.0.20

  • Guard against potential state update after unmount (caused by setTimeout when using ResizeObserver)

1.0.19

  • Further improved TypeScript definitions to avoid any types for children function parameters.
  • 61: Build release bundle with Preconstruct.

1.0.18

  • Refine TypeScript types so that disableHeight and disableWidth are properly paired with conditional types like children and onResize.

1.0.17

  • Support non-integer padding styles.

1.0.16

  • Relaxed children prop return type from ReactElement to ReactNode.

1.0.15

  • Readme changes

1.0.14

  • Fix potential "ResizeObserver loop limit exceeded" error caused by long-running renders (#​55)

1.0.13

  • Transpile nullish coalescing operator (#​53)

1.0.12

  • Fix regression introduced in 1.0.8 with transformations; pass unscaled width and height as "default" params (and add additional scaledHeight and scaledWidth params to children function)
  • Use ResizeObserver when possible; fallback to legacy resize polyfill logic otherwise

1.0.11

  • Pre-transform static class property syntax (defaultProps) (#​46)
  • Fixed bad TypeScript definition for onResize prop (#​44)

1.0.10

  • Add named exports for AutoSizer as well as Props and Size types.

1.0.9

  • Add optional tagName property (default to "div").

1.0.8

  • Replace offsetHeight/offsetWidth with getBoundingClientRect to better support floating size values
  • Spread all additional props onto out HTMLDivElement

1.0.7

  • Add peer dependency for "react" / "react-dom" version 18

1.0.6

  • Fixed rAF throttling issue caused by new Chrome flag (#​39)

1.0.5

  • Add peer dependency for "react" / "react-dom" version 17

1.0.4

  • Do not use innerHTML when detecting element resize as this will throw an error if the page uses Trusted Types (#​30)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

| datasource | package                      | from   | to    |
| ---------- | ---------------------------- | ------ | ----- |
| npm        | react-virtualized-auto-sizer | 1.0.26 | 2.0.2 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant