The Navigation component has some control over display on overflow. I am using the Horizontal Orientation and scrolling arrows appear at the left and right ends of the component when needed. I have set the Overflow mode to Scroll.
The problem is that there are times when I want the component to scroll to the beginning after the user has done something that causes the dataset behind the component to be modified.
I foolishly wasted an hour fiddling with scrollIntoView not working until I realized it applies to the component's position within the parent container, not the contents of the component itself. I would guess that the functionality I am seeking would be a method like scrollToRow. Alas....
Just to clarify, we're talking about the scrolling within the Menu items (<- | ->) and not the items inside of the dropdown of a single menu item, right?
I would assume that wrapping in a timeout, lets the first call to setHidden re-render, then "instantly" re-render again after the timeout, back to the beginning.
Without the timeout, I am guessing that the two setHidden calls would cause the visibility to flip true/false within that same render cycle, and re-render to the same state.
If that is the concern wouldn't this work deterministically?
await navigation2.setHidden(true);
// await code that causes navigation2 to be modified
await navigation2.setHidden(false);
Since the code that modifies the navigation2 component runs very fast introducing a delay seems like it could make a "flashing" effect be more likely to be visible.