Skip to content

Commit

Permalink
Fix primefaces#6639 VirtualScroller: does not update items if only ro…
Browse files Browse the repository at this point in the history
…ws length changes
  • Loading branch information
mamsellem committed May 19, 2024
1 parent 463ba5c commit c6c84a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/virtualscroller/VirtualScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export const VirtualScroller = React.memo(
}, [numToleratedItemsState]);

useUpdateEffect(() => {
if (!prevProps.items || prevProps.items.length !== (props.items || []).length) {
if (!prevProps.items || prevProps.items.length !== (props.items || []).length || (both && prevProps.items[0].length !== (props.items ? props.items[0].length : 0))) {
init();
}

Expand Down

0 comments on commit c6c84a4

Please sign in to comment.