Skip to content

Commit

Permalink
fix(web): fix webrender listview item relayout
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Oct 21, 2024
1 parent 29f2ba1 commit f16c6cb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ export class ListViewItem extends HippyWebView<HTMLDivElement> {
public handleReLayout(entries: ResizeObserverEntry[]) {
const [entry] = entries;
const { height } = entry.contentRect;
if ((height === 0 && Math.round(height) !== this.height) || Math.round(height) !== this.dom?.clientHeight) {
if ((Math.round(height) === this.height) && Math.round(height) === this.dom?.clientHeight) {
// no need to relayout ListViewItem when height is not changed
return;
}
this.height = Math.round(height);
Expand Down

0 comments on commit f16c6cb

Please sign in to comment.