Attribute changed for parent outside of ShadowDom (display: none -> display: flex -> display: none)

StackOverflow https://stackoverflow.com/questions/23470266

  •  15-07-2023
  •  | 
  •  

Question

My Angular-Component lives inside a flexbox (id="log") The flexbox can be displayed or hidden. Inside of my component there is a scrollable area which displays log messages. (id="message-list") The height of message-list has to be set programmatically set according to the parents size. (And YES - it has to be set programmatically, worked on this several hours)

The problem is - I don't know when the parent (log (outside of component)) is changing it's state. onShadowRoot does not help because it's called when the Component is inserted into SR which has nothing todo with its visibility.

thx for a hint.

enter image description here

Was it helpful?

Solution

I built a Decorator/Directive that generates events when an element changes it's size. You could apply this to the parent. See my answer to How to scrollTop a div whose content is managed by AngularDart? for more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top