<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [QueryPreview](./x-components.querypreview.md)

## QueryPreview variable

Retrieves a preview of the results of a query and exposes them in the default slot, along with the query preview and the totalResults of the search request. By default, it renders the names of the results.

**Signature:**

```typescript
_default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
    queryPreviewInfo: {
        type: PropType<QueryPreviewInfo>;
        required: true;
    };
    queryFeature: {
        type: PropType<QueryFeature>;
    };
    maxItemsToRender: {
        type: NumberConstructor;
    };
    loadWhenVisible: {
        type: BooleanConstructor;
        default: boolean;
    };
    debounceTimeMs: {
        type: NumberConstructor;
        default: number;
    };
    persistInCache: {
        type: BooleanConstructor;
        default: boolean;
    };
}>, {
    hasResults: import("vue").ComputedRef<boolean>;
    queryPreviewResults: import("vue").ComputedRef<{
        results: import("@empathyco/x-types").Result[];
        request: SearchRequest;
        displayTagging?: import("@empathyco/x-types").TaggingRequest;
        queryTagging?: import("@empathyco/x-types").TaggingRequest;
        totalResults: number;
        instances: number;
        status: import("../../..").RequestStatus;
    } | undefined>;
    queryPreviewElement: Ref<HTMLElement | null, HTMLElement | null>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("load" | "error")[], "load" | "error", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
    queryPreviewInfo: {
        type: PropType<QueryPreviewInfo>;
        required: true;
    };
    queryFeature: {
        type: PropType<QueryFeature>;
    };
    maxItemsToRender: {
        type: NumberConstructor;
    };
    loadWhenVisible: {
        type: BooleanConstructor;
        default: boolean;
    };
    debounceTimeMs: {
        type: NumberConstructor;
        default: number;
    };
    persistInCache: {
        type: BooleanConstructor;
        default: boolean;
    };
}>> & Readonly<{
    onLoad?: ((...args: any[]) => any) | undefined;
    onError?: ((...args: any[]) => any) | undefined;
}>, {
    loadWhenVisible: boolean;
    debounceTimeMs: number;
    persistInCache: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>
```
