# BindingElementToObservers

Class · extends [`BindingBase`](https://api.playcanvas.com/pcui/classes/BindingBase.md)

Source: https://github.com/playcanvas/pcui/blob/77ed2b8ba8660c9644049b0d1942652721e7a6c4/src/binding/BindingElementToObservers/index.ts#L9

Provides one way binding between an [IBindable](https://api.playcanvas.com/pcui/interfaces/IBindable.md) element and Observers. Any changes from
the element will be propagated to the observers.

## Methods

### addValue

```ts
addValue(value: unknown): void
```

Adds (inserts) a value to the linked observers at the linked paths.

**Parameters**

- `value` (`unknown`): The value.

### addValues

```ts
addValues(values: unknown[]): void
```

Adds (inserts) multiple values to the linked observers at the linked paths.

**Parameters**

- `values` (`unknown[]`): The values.

### clone

```ts
clone(): BindingElementToObservers
```

Clone the binding and return a new instance.

**Returns** [`BindingElementToObservers`](https://api.playcanvas.com/pcui/classes/BindingElementToObservers.md)

### removeValue

```ts
removeValue(value: unknown): void
```

Removes a value from the linked observers at the linked paths.

**Parameters**

- `value` (`unknown`): The value.

### removeValues

```ts
removeValues(values: unknown[]): void
```

Removes multiple values from the linked observers from the linked paths.

**Parameters**

- `values` (`unknown[]`): The values.

### setValue

```ts
setValue(value: unknown): void
```

Sets a value to the linked observers at the linked paths.

**Parameters**

- `value` (`unknown`): The value

### setValues

```ts
setValues(values: unknown[]): void
```

Sets an array of values to the linked observers at the linked paths.

**Parameters**

- `values` (`unknown[]`): The values.

## Inherited from [BindingBase](https://api.playcanvas.com/pcui/classes/BindingBase.md)

- `new BindingElementToObservers(args: Readonly<BindingBaseArgs>)`
- `get element(): IBindable<unknown>` · `set element(value: IBindable<unknown>)`
- `get historyEnabled(): boolean` · `set historyEnabled(value: boolean)`
- `get historyName(): string` · `set historyName(value: string)`
- `get historyPrefix(): string` · `set historyPrefix(value: string)`
- `get linked(): boolean`
- `get observers(): Observer[]`
- `get paths(): string[]`
- `link(observers: Observer | Observer[], paths: string | string[]): void`
- `unlink(): void`

## Inherited from [BindingObserversToElement](https://api.playcanvas.com/pcui/classes/BindingObserversToElement.md)

- `get applyingChange(): boolean` · `set applyingChange(value: boolean)`
- `get historyCombine(): boolean` · `set historyCombine(value: boolean)`
- `get historyPostfix(): string` · `set historyPostfix(value: string)`
