You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The _isVisible method checks offsetWidth and offsetHeight of the iron-list element to determine if it the list is visible or not. The method is used to determine whether the list should be rendered and to trigger adding/removing the scroll listener, I'm assuming as a performance optimization.
The problem with always checking the iron-list element itself is that if an external scrollTarget is used, the size if the list is not a good indicator for whether it is 'visible'. For example, if the list is empty and not sized explicitly, the iron-list elements height will be 0, which will prevent a render even if the corresponding scrollTarget is visible. I've also had problems with the scroll handler being removed and not added back if the scrollTarget was hidden and shown while the list itself was empty.
The obvious and simple fix is to check the size of the scrollTarget instead of the iron-list element itself. Gonna submit a PR for this soon.
The text was updated successfully, but these errors were encountered:
The
_isVisible
method checksoffsetWidth
andoffsetHeight
of theiron-list
element to determine if it the list is visible or not. The method is used to determine whether the list should be rendered and to trigger adding/removing the scroll listener, I'm assuming as a performance optimization.The problem with always checking the
iron-list
element itself is that if an externalscrollTarget
is used, the size if the list is not a good indicator for whether it is 'visible'. For example, if the list is empty and not sized explicitly, theiron-list
elements height will be0
, which will prevent a render even if the correspondingscrollTarget
is visible. I've also had problems with the scroll handler being removed and not added back if thescrollTarget
was hidden and shown while the list itself was empty.The obvious and simple fix is to check the size of the
scrollTarget
instead of theiron-list
element itself. Gonna submit a PR for this soon.The text was updated successfully, but these errors were encountered: