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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user