> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IAttributeFilterHandlerOptionsBase

- Package: [@gooddata/sdk-ui-filters](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-filters/src/AttributeFilterHandler/factory.ts

Common options for initialization of the [IAttributeFilterHandler](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.iattributefilterhandler/index.md).

**Signature:**

```typescript
export interface IAttributeFilterHandlerOptionsBase 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [displayAsLabel?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.iattributefilterhandleroptionsbase/index.md#iattributefilterhandleroptionsbasedisplayaslabel) |  | [ObjRef](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.objref/index.md) | _(Optional)_ If specified, the attribute filter will display the elements in specified label form. |
| [hiddenElements?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.iattributefilterhandleroptionsbase/index.md#iattributefilterhandleroptionsbasehiddenelements) |  | string[] | _(Optional)_ If specified, these will be excluded from the elements available for selection and will also be removed from the resulting filter. This effectively behaves as if those elements were not part of the underlying display form. |
| [staticElements?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.iattributefilterhandleroptionsbase/index.md#iattributefilterhandleroptionsbasestaticelements) |  | [IAttributeElement](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.iattributeelement/index.md)[] | _(Optional)_ If specified, these elements will replace the elements that would be loaded from the server. Note that if using this, limiting measures and/or filters will not work: it is your responsibility to filter the static elements yourself. |
| [withoutApply?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-filters/sdk-ui-filters.iattributefilterhandleroptionsbase/index.md#iattributefilterhandleroptionsbasewithoutapply) |  | boolean | _(Optional)_ if true, the attribute filter will not display the apply button Several other behaviours are also affected by this option like dependent filters |

## Property details

### IAttributeFilterHandlerOptionsBase.displayAsLabel

If specified, the attribute filter will display the elements in specified label form.

**Signature:**

```typescript
displayAsLabel?: ObjRef;
```

### IAttributeFilterHandlerOptionsBase.hiddenElements

If specified, these will be excluded from the elements available for selection and will also be removed from the resulting filter. This effectively behaves as if those elements were not part of the underlying display form.

**Signature:**

```typescript
hiddenElements?: string[];
```

#### Remarks

The meaning of the items is determined by the way the filter is specified: if the filter uses URIs, then these are also interpreted as URIs, analogously with values.

If using hiddenElements, make sure your input filter excludes the hidden elements, otherwise it could lead to non-intuitive behavior. So, for positive filters, make sure their elements do NOT contain any of the `hiddenElements`. Inversely for negative filters, make sure their elements do contain all of the `hiddenElements`.

#### Example

This is how to correctly create a filter that has some items hidden but is set to All:

```tsx
const hiddenUris: ["uri1", "uri2"];
// make sure to use the uris both in the filter...
const filter = newNegativeAttributeFilter("displayForm", { uris: hiddenUris });
// ...and also in the config
const handler = newAttributeFilterHandler(backend, workspace, filter, { hiddenElements: hiddenUris });
```

### IAttributeFilterHandlerOptionsBase.staticElements

If specified, these elements will replace the elements that would be loaded from the server. Note that if using this, limiting measures and/or filters will not work: it is your responsibility to filter the static elements yourself.

**Signature:**

```typescript
staticElements?: IAttributeElement[];
```

### IAttributeFilterHandlerOptionsBase.withoutApply

if true, the attribute filter will not display the apply button Several other behaviours are also affected by this option like dependent filters

**Signature:**

```typescript
withoutApply?: boolean;
```
