import {autobind} from "core-decorators"; import {observer} from "mobx-react"; import * as React from "react"; import {injectStyle, StyleInjector} from "../../theming"; import {LineProps} from "./line"; import {ListBase, ListBaseProps} from "./list-base"; import {selection} from "./style/list.css"; export interface ListProps> extends ListBaseProps { data?: T[]; } @autobind @observer export class ListWithoutStyle, AP> extends ListBase & AP> { protected get data() { return this.props.data || []; } protected renderLines() { const {LineComponent, lineProps} = this.props; return this.displayedData.map((item, idx) => ( )); } render() { const {classNames} = this.props; return (
    {this.renderLines()} {this.renderManualFetch()}
); } } export const List: StyleInjector, {}>> = injectStyle("list", ListWithoutStyle) as any; export function listFor>(props: ListProps) { const List2 = List as any; return ; };