π· Update dependency react-window to v2 #4052
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.8.11β2.2.31.8.8β2.0.0Release Notes
bvaughn/react-window (react-window)
v2.2.3Compare Source
ListandGridimperative methods to specify when a method throws.RangeError(instead of a regularError) if an invalid index is passed to one of the imperative scroll-to methods.v2.2.2Compare Source
The return type of
ListandGridcomponents is explicitly annotated asReactElement. The return type ofrowComponentandcellComponentchanged fromReactNodetoReactElement. This was done to fix TypeScript warnings for React versions 18.0 - 18.2. (See issue #β875)v2.2.1Compare Source
useDynamicRowHeightv2.2.0Compare Source
useDynamicRowHeighthook.v2.1.2Compare Source
Prevent
ResizeObserverAPI from being called at all if an explicitListheight (orGridwidth and height) is provided.v2.1.1Compare Source
Grids with only one row no longer incorrectly set cell height to 100%.
v2.1.0Compare Source
Improved ARIA support:
HTMLDivElementariaAttributesprop to row and cell renderers to simplify better ARIA attributes for user-rendered cellsHTMLDivElementfromListandGridchildrenprop toListandGridfor e.g. overlays/tooltipstagNameprop; defaults to"div"but can be changed to e.g."ul"Added optional
childrenprop to better support edge cases like sticky rows.Minor changes to
onRowsRenderedandonCellsRenderedcallbacks to make it easier to differentiate between visible items and items rendered due to overscan settings. These methods will now receive two paramsβ the first for visible rows and the second for all rows (including overscan), e.g.:v2.0.2Compare Source
Fixed edge-case bug with
Gridimperative APIscrollToCellmethod and "smooth" scrolling behavior.v2.0.1Compare Source
roleattribute fromListandGrid. This resulted in potentially invalid configurations (e.g. a ARIA list should contain at least one listitem but that was not enforced by this library). Users of this library should specify theroleattribute that makes the most sense to them based on mdn guidelines. For example:v2.0.0Compare Source
Version 2 is a major rewrite that offers the following benefits:
ListandGrid(no more need forAutoSizer)@types/react-window)Upgrade path
This section contains a couple of examples for common upgrade paths. Please refer to the documentation for more information.
Migrating
FixedSizeListBefore
After
Migrating
VariableSizedListBefore
After
Migrating
FixedSizeGridBefore
After
Migrating
VariableSizeGridBefore
After
The following requirements are new in version 2 and may be reasons to consider not upgrading:
ResizeObserverprimitive (or polyfill) is required unless explicit pixel dimensions are provided viastyleprop; (see documentation for more)1.8.11
1.8.10
1.8.9
1.8.8
scrollToItemaccounts for scrollbar size in the uncommon case where a List component has scrolling in the non-dominant direction (e.g. a "vertical" layout list also scrolls horizontally).1.8.7
1.8.6
1.8.5
1.8.4
visibleStopIndexinonItemsRendered. (Previously this value was incorrectly reported as one index higher.) - (justingrant - #β274)scrollToItem"center" mode when the item being scrolled to is near the viewport edge. - (justingrant - #β274)1.8.3
scrollToItemwhen scrollbars are present (MarkFalconbridge - #β267)1.8.2
overscanColumnsCountandoverscanRowsCountprops in favor of more consistently namedoverscanColumnCountandoverscanRowCount. (nihgwu - #β229)1.8.1
pointer-eventswithundefined(oliviertassinari - #β210)1.8.0
1.7.2
scrollTo()is called with a negative offset or whenscrollToItemis called with invalid indices (negative or too large).1.7.1
1.7.0
scrollToItemsupports optionalrowIndexandcolumnIndexparams (jgoz - #β174)WeakSetsupport before using it to avoid requiring a polyfill for IE11 - (jgoz - #β167)1.6.2
1.6.1
1.6.0
scrollToItemmethods take scrollbar size into account when aligning items - #β1531.5.2
VariableSizeListandVariableSizeGridwhen the number of items decreases while a scroll is in progress. - (iamsolankiamit - #β138)1.5.1
getDerivedStateFlow annotations to address a warning in a newer version of Flow.1.5.0
areEqualandshouldComponentUpdatefor item renderers. - #β1141.4.0
overscanColumnsCountandoverscanRowsCountprops. LegacyoverscanCountprop will continue to work, but with a deprecation warning in DEV mode.setTimeoutwithrequestAnimationFramebased timer, to avoid starvation issue forisScrollingreset. - #β106innerTagNameandouterTagNameprops toinnerElementTypeandouterElementTypeto formalize support for attaching arbitrary props (e.g. test ids) to List and Grid inner and outer DOM elements. LegacyinnerTagNameandouterTagNameprops will continue to work, but with a deprecation warning in DEV mode.directionprop changes. - #β1041.3.1
itemDatavalue to customitemKeycallbacks when present - #β90)1.3.0
1.2.4
1.2.3
childrenvalidation checks. They were too strict and didn't support new React APIs likememo.1.2.2
1.2.1
itemDataparameter. (TrySound - #β66)VariableSizeListandVariableSizeGridno longer call size getter functions with invalid index when item count is zero.1.2.0
scrollTomethod to makescrollLeftandscrollTopparams optional (so you can only update one axis if desired). - #β63)thispointer inVariableSizeGridthat broke theresetAfter*methods - #β58)overflow:hiddenfrom inner container (souporserious - #β56)1.1.2
scrollToItembug that caused lists/grids with very few items to have negative scroll offsets.1.1.1
FixedSizeGridandFixedSizeListautomatically clear style cache when item size props change.1.1.0
constructorandsuperto generate cleaner component code. (Andarist - #β26)shouldForceUpdateparam reset-index methods to specifyforceUpdatebehavior. (nihgwu - #β32)1.0.3
1.0.2
annotate-pure-callsoption so that classes compiled by "transform-es2015-classes" are annotated with#__PURE__. This enables UglifyJS to remove them if they are not referenced, improving dead code elimination in application code. (Andarist - #β20)includeDependenciesflag so that the "memoize-one" dependency does not get inlined into the Rollup bundle. (Andarist - #β19)1.0.1
Updated
README.mdfile to remove@alphatag from NPM installation instructions.Configuration
π Schedule: Branch creation - "every weekend" (UTC), 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.