From 220f35ae039bc9392391c5228dfb43fb4f803a9f Mon Sep 17 00:00:00 2001 From: Bruno Windels <274386+bwindels@users.noreply.github.com> Date: Fri, 8 Apr 2022 11:52:21 +0200 Subject: [PATCH] fix typescript error --- src/platform/web/ui/session/room/TimelineView.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platform/web/ui/session/room/TimelineView.ts b/src/platform/web/ui/session/room/TimelineView.ts index 91ff59d5..0c893847 100644 --- a/src/platform/web/ui/session/room/TimelineView.ts +++ b/src/platform/web/ui/session/room/TimelineView.ts @@ -26,6 +26,7 @@ import {BaseObservableList as ObservableList} from "../../../../../observable/li export interface TileView extends IView { readonly value: SimpleTile; + onClick(event: UIEvent); } export type TileViewConstructor = new (tile: SimpleTile) => TileView; export type ViewClassForEntryFn = (tile: SimpleTile) => TileViewConstructor; @@ -184,11 +185,10 @@ class TilesListView extends ListView { private onChanged: () => void; constructor(tiles: ObservableList, onChanged: () => void, private readonly viewClassForEntry: ViewClassForEntryFn) { - const options = { + super({ list: tiles, onItemClick: (tileView, evt) => tileView.onClick(evt), - }; - super(options, entry => { + }, entry => { const View = viewClassForEntry(entry); return new View(entry); });