Clicking on "Year" first time brings us to the beginning of the list (1900 year), even if other year is selected.
When the "centerSelected" method is called for the first time, the template is not rendered yet.
That is why the method doesn't work as it should — the year is not placed to the center.
If we go back and then click the year again, method works as expected.
Clicking on "Year" first time brings us to the beginning of the list (1900 year), even if other year is selected.
When the "centerSelected" method is called for the first time, the template is not rendered yet.
That is why the method doesn't work as it should — the year is not placed to the center. If we go back and then click the year again, method works as expected.