diff --git a/src/components/ScrollerManager.vue b/src/components/ScrollerManager.vue index a98035bc..2c43fcac 100644 --- a/src/components/ScrollerManager.vue +++ b/src/components/ScrollerManager.vue @@ -19,7 +19,7 @@
-
@@ -77,7 +77,15 @@ export default class ScrollerManager extends Mixins(GlobalMixin) { /** Get the visible ticks */ get visibleTicks() { - return this.ticks.filter(tick => tick.s); + let key = 999900; + return this.ticks.filter(tick => tick.s).map(tick => { + if (tick.text) { + tick.key = key = tick.dayId * 100; + } else { + tick.key = ++key; // days are sorted descending + } + return tick; + }); } /** Reset state */ diff --git a/src/types.ts b/src/types.ts index 8a968fb8..98db049f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -146,6 +146,8 @@ export type ITick = { text?: string | number; /** Whether this tick should be shown */ s?: boolean; + /** Key for vue component */ + key?: number } export type TopMatter = {