Skip to content

Commit

Permalink
Improve typing
Browse files Browse the repository at this point in the history
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
  • Loading branch information
SimonBrandner committed Sep 20, 2021
1 parent 26ae71f commit ec4f672
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/views/elements/LazyRenderList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ItemRange {
}
}

interface IProps<T extends unknown> {
interface IProps<T> {
// height in pixels of the component returned by `renderItem`
itemHeight: number;
// function to turn an element of `items` into a react component
Expand Down Expand Up @@ -84,13 +84,13 @@ interface IState {
}

@replaceableComponent("views.elements.LazyRenderList")
export default class LazyRenderList extends React.Component<IProps<unknown>, IState> {
export default class LazyRenderList<T = any> extends React.Component<IProps<T>, IState> {
public static defaultProps: Partial<IProps<unknown>> = {
overflowItems: 20,
overflowMargin: 5,
};

constructor(props: IProps<unknown>) {
constructor(props: IProps<T>) {
super(props);

this.state = {
Expand Down

0 comments on commit ec4f672

Please sign in to comment.