Avoid flicker of the room list filter on resize (#30787)

* fix: avoid flicker of the room list filter on resize

* test: update existing test to render correctly

* test: add test to avoid flicker regression
This commit is contained in:
Florian Duros
2025-09-16 15:52:36 +00:00
committed by GitHub
parent 6f41ac58bc
commit 841f12bd46
3 changed files with 47 additions and 17 deletions
@@ -103,7 +103,7 @@ function useCollapseFilters<T extends HTMLElement>(
// If the previous element is on the left element of the current one, it means that the filter is wrapping
const previousSibling = child.previousElementSibling as HTMLElement | null;
if (previousSibling && child.offsetLeft < previousSibling.offsetLeft) {
if (previousSibling && child.offsetLeft <= previousSibling.offsetLeft) {
if (!isWrapping) setWrappingIndex(i);
isWrapping = true;
}