# DisplayedCriteriaEventArgs Type documentation

## TypeScript declaration

### [DisplayedCriteriaEventArgs](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L127-L142>)

**Kind:** interface

```
import type { DisplayedCriteriaEventArgs } from '@siemens/element-ng/filtered-search';
```

Event allows to intercept and change the displayed criteria before shown in typeahead.

```
interface DisplayedCriteriaEventArgs
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [criteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L131-L131>) | `string[]` | List of criteria names to display in typeahead. |
| [searchCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L135-L135>) | `SearchCriteria` | Current search criteria. |

#### Methods

##### allow

[Source for allow](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>)

Interceptor function allows to reduce the list of displayed criteria.

```
allow(criteriaNamesToDisplay: string[], freeText?: boolean): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [criteriaNamesToDisplay](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>) | `string[]` |  | • list of criteria names to be displayed. |
| [freeText](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L141-L141>) (optional) | `boolean` |  | • indicates whether free text pills are allowed. |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [SearchCriteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L112-L122>)

**Kind:** interface

```
import type { SearchCriteria } from '@siemens/element-ng/filtered-search';
```

On search, the filtered search component emits a SearchCriteria object. It consists of all user selected criteria and the free text input value.

```
interface SearchCriteria
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [criteria](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L117-L117>) | `CriterionValue[]` | The selected criteria of the filtered search. Each criteria has a name and a value. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L121-L121>) | `string` | Additional unstructured free text, which the user entered in the search. |

### [CriterionValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L13-L30>)

**Kind:** interface

```
import type { CriterionValue } from '@siemens/element-ng/filtered-search';
```

A CriterionValue is the input/output value of the [SiFilteredSearchComponent](<../../components/SiFilteredSearchComponent/index.html#SiFilteredSearchComponent>), containing the user input.

```
interface CriterionValue
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [dateValue](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L29-L29>) (optional) | `Date` | If the criterion was defined as date or date-time this field will contain the value das js Date. |
| [name](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L17-L17>) | `string` | The mandatory name of a criterion. |
| [operator](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L21-L21>) (optional) | `string` | This property holds the selected or entered operator of the criterion. |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/filtered-search/si-filtered-search.model.ts#L27-L27>) (optional) | `string \| string[]` | The value property holds the selected or entered value/values of the criterion. The value can also be passed as an array of strings. When `multiSelect` is enabled, the items in the value array will be shown as selected values in value input and the typeahead. |
