84 lines
3.0 KiB
TypeScript
84 lines
3.0 KiB
TypeScript
import { VirtualItem, Virtualizer } from '@tanstack/vue-virtual';
|
|
import { AcceptableValue } from '../shared/types';
|
|
export interface ListboxVirtualizerProps<T extends AcceptableValue = AcceptableValue> {
|
|
/** List of items */
|
|
options: T[];
|
|
/** Estimated size (in px) of each item */
|
|
estimateSize?: number;
|
|
/** text content for each item to achieve type-ahead feature */
|
|
textContent?: (option: T) => string;
|
|
}
|
|
declare const _default: <T extends AcceptableValue = AcceptableValue>(__VLS_props: {
|
|
options: T[];
|
|
estimateSize?: number | undefined;
|
|
textContent?: ((option: T) => string) | undefined;
|
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
|
|
slots: Readonly<{
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
}> & {
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
};
|
|
attrs: any;
|
|
emit: {};
|
|
} | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
|
|
props: {
|
|
options: T[];
|
|
estimateSize?: number | undefined;
|
|
textContent?: ((option: T) => string) | undefined;
|
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
attrs: any;
|
|
slots: Readonly<{
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
}> & {
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
};
|
|
emit: {};
|
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
[key: string]: any;
|
|
}> & {
|
|
__ctx?: {
|
|
props: {
|
|
options: T[];
|
|
estimateSize?: number | undefined;
|
|
textContent?: ((option: T) => string) | undefined;
|
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
attrs: any;
|
|
slots: Readonly<{
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
}> & {
|
|
default: (props: {
|
|
option: T;
|
|
virtualizer: Virtualizer<Element | Window, Element>;
|
|
virtualItem: VirtualItem<Element>;
|
|
}) => any;
|
|
};
|
|
emit: {};
|
|
} | undefined;
|
|
};
|
|
export default _default;
|
|
type __VLS_PrettifyLocal<T> = {
|
|
[K in keyof T]: T[K];
|
|
} & {};
|