kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
75 lines (74 loc) • 2.51 kB
TypeScript
import React, { Component, ElementType } from 'react';
import { BaseComponentProps } from '../../types';
export declare const classList: {
list: string;
listHeader: string;
listSection: string;
listItem: string;
listItemAnchor: string;
listItemFixed: string;
};
export declare type ListItemProps<Option> = {
value: Option;
displayOption: (opt: Option) => string;
disabled?: boolean;
light?: boolean;
};
export declare const ListItem: ({ value, displayOption, disabled }: ListItemProps<any>) => React.JSX.Element;
export declare type DropdownListWrapperProps = BaseComponentProps & {
light?: boolean;
};
declare type Option = string | number | boolean | object | any;
interface DropdownListProps {
options?: Option[];
allowCustomValues?: number;
customClasses?: {
listHeader?: string;
listItem?: string;
results?: string;
};
customValues?: any[];
customListItemComponent?: ElementType;
customListHeaderComponent?: ElementType;
selectionIndex?: number;
onOptionSelected?: (option: Option, event: React.MouseEvent) => void;
displayOption?: (option: Option) => string;
defaultClassNames?: boolean;
areResultsTruncated?: boolean;
resultsTruncatedMessage?: string;
listItemComponent?: ElementType;
light?: boolean;
fixedOptions?: any[];
selectedItems?: any[];
}
interface DropdownListState {
options: Array<any> | null;
}
export default class DropdownList extends Component<DropdownListProps, DropdownListState> {
static defaultProps: {
customClasses: {};
customListItemComponent: ({ value, displayOption, disabled }: ListItemProps<any>) => React.JSX.Element;
customListHeaderComponent: null;
allowCustomValues: number;
customValues: never[];
displayOption: (d: any) => any;
onOptionSelected: () => void;
defaultClassNames: boolean;
selectionIndex: null;
};
initNumberOfOptions: number;
page: number;
prevY: number;
loadingRef: React.RefObject<HTMLDivElement>;
observer: IntersectionObserver | undefined;
constructor(props: any);
componentDidMount(): void;
getSnapshotBeforeUpdate(prevProps: DropdownListProps): null;
componentDidUpdate(): void;
componentWillUnmount(): void;
handleObserver: (entities: any) => void;
_getOptions(page: any): any[] | null;
_onClick(result: any, event: any): void;
render(): React.JSX.Element;
}
export {};