fix(tabs): type const -> ScrollBehavior

This commit is contained in:
Glenn Vandeuren 2023-09-13 18:44:46 +02:00
parent fe79d2adfd
commit 349c2d1ee5

View File

@ -156,7 +156,7 @@ export class Tabs extends LitElement {
const max = offset + extent - hostExtent + scrollMargin;
const to = Math.min(min, Math.max(max, scroll));
// TODO(b/299934312): improve focus smoothness
const behavior = !this.focusedTab ? 'smooth' : 'instant' as const;
const behavior = !this.focusedTab ? 'smooth' : 'instant' as ScrollBehavior;
this.scrollTo({behavior, top: 0, left: to});
}