# CustomInFilterValuesContext

Canonical page: https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext

Context used when providing values for the IN Column Filter

```ts title="TypeScript"
export interface CustomInFilterValuesContext<TData = any> extends AdaptableColumnContext 
```

###### Extends

[`AdaptableColumnContext`](https://www.adaptabletools.com/docs/reference/adaptablecolumncontext.md)

## Properties

| Property | Type | Description | Default |
| --- | --- | --- | --- |
| [currentSearchValue](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#currentsearchvalue) | `string` | Current text in the IN Filter search box.<br/><br/>Useful when implementing server-side filtering of the value list. |   |
| [defaultValues](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#defaultvalues) | [`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]` | Distinct Column values in natural (unsorted) row iteration order.<br/><br/>When the Column uses a Tree Filter, items have a hierarchical structure.<br/><br/>Computed lazily on first access. |   |
| [limit](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#limit) | `number` | Suggested page size. Consumers may return fewer or more items. Useful when `hasMore` is true on the return object (lazy pagination). | 1000 |
| [offset](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#offset) | `number` | Zero-based index of the first value to return.<br/>Reset to 0 when the dropdown opens or `currentSearchValue` changes.<br/>Increased when loading the next page (`hasMore` is true on the return object - this means lazy pagination is enabled). | 0 |
| [orderedValues](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#orderedvalues) | [`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]` | Distinct Column values in the order they appear in the grid from top to bottom.<br/><br/>Always a flat list, even when the Column uses a Tree Filter.<br/><br/>Computed lazily on first access. |   |
| [previousFilterResult](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#previousfilterresult) | [`InFilterValueResult`](https://www.adaptabletools.com/docs/reference/infiltervalueresult.md) | The result returned by the previous invocation of `FilterOptions.customInFilterValues`, if any.<br/><br/>Useful for avoiding expensive recomputations (e.g. when filtering is async or server-side).<br/>Opaque pagination cursors may also be stashed on this object and read on the next call. |   |
| [selectedValues](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#selectedvalues) | [`InFilterValue`](https://www.adaptabletools.com/docs/reference/infiltervalue.md)`[]` | Values currently selected in the IN (or NOT IN) Column Filter.<br/><br/>Labels are resolved from previously loaded In Filter items when available.<br/><br/>Useful with lazy pagination or server-side search: selected items may not be in the current page. |   |
| [sortedValues](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#sortedvalues) | [`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]` | Distinct Column values sorted by the Column&#39;s own sort direction (Asc / Desc).<br/><br/>If the Column has no active sort, values are returned in the same order as `defaultValues`.<br/><br/>When the Column uses a Tree Filter, items have a hierarchical structure.<br/><br/>Computed lazily on first access. |   |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/custominfiltervaluescontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |   |

## Property Details

### currentSearchValue

Current text in the IN Filter search box.

Useful when implementing server-side filtering of the value list.

```ts title="TypeScript"
currentSearchValue: string;
```

###### Property Value

`string`

### defaultValues

Distinct Column values in natural (unsorted) row iteration order.

When the Column uses a Tree Filter, items have a hierarchical structure.

Computed lazily on first access.

```ts title="TypeScript"
defaultValues: ComputedInFilterValueInfo[];
```

###### Property Value

[`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]`

### limit

Suggested page size. Consumers may return fewer or more items. Useful when `hasMore` is true on the return object (lazy pagination).

```ts title="TypeScript"
limit: number;
```

###### Default Value

1000

###### Property Value

`number`

### offset

Zero-based index of the first value to return.
Reset to 0 when the dropdown opens or `currentSearchValue` changes.
Increased when loading the next page (`hasMore` is true on the return object - this means lazy pagination is enabled).

```ts title="TypeScript"
offset: number;
```

###### Default Value

0

###### Property Value

`number`

### orderedValues

Distinct Column values in the order they appear in the grid from top to bottom.

Always a flat list, even when the Column uses a Tree Filter.

Computed lazily on first access.

```ts title="TypeScript"
orderedValues: ComputedInFilterValueInfo[];
```

###### Property Value

[`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]`

### previousFilterResult

The result returned by the previous invocation of `FilterOptions.customInFilterValues`, if any.

Useful for avoiding expensive recomputations (e.g. when filtering is async or server-side).
Opaque pagination cursors may also be stashed on this object and read on the next call.

```ts title="TypeScript"
previousFilterResult?: InFilterValueResult;
```

###### Property Value

[`InFilterValueResult`](https://www.adaptabletools.com/docs/reference/infiltervalueresult.md)

### selectedValues

Values currently selected in the IN (or NOT IN) Column Filter.

Labels are resolved from previously loaded In Filter items when available.

Useful with lazy pagination or server-side search: selected items may not be in the current page.

```ts title="TypeScript"
selectedValues: InFilterValue[];
```

###### Property Value

[`InFilterValue`](https://www.adaptabletools.com/docs/reference/infiltervalue.md)`[]`

### sortedValues

Distinct Column values sorted by the Column&#39;s own sort direction (Asc / Desc).

If the Column has no active sort, values are returned in the same order as `defaultValues`.

When the Column uses a Tree Filter, items have a hierarchical structure.

Computed lazily on first access.

```ts title="TypeScript"
sortedValues: ComputedInFilterValueInfo[];
```

###### Property Value

[`ComputedInFilterValueInfo`](https://www.adaptabletools.com/docs/reference/computedinfiltervalueinfo.md)`[]`

### adaptableContext

> *Inherited from [BaseContext](https://www.adaptabletools.com/docs/reference/basecontext.md)*

Custom application Context provided in `AdaptableOptions.adaptableContext`

```ts title="TypeScript"
adaptableContext: any;
```

###### Property Value

`any`
