# Observables

Many WireBootstrap components including the [Bootstrap Select](https://docs.wirebootstrap.com/components/bootstrap/select) component in this example support one-way observable functionality.  With this configured, any changes to the component will automatically update an object's property with the changed value.  In addition, if the property initially contains a value, this value will be selected by default.

## Model

To configure this observable functionality, set the `model` attribute's `obj` and `property` values as seen in the example below. &#x20;

```javascript
let user = { UserName: "jkratz" };

const select = new wire.bsSelect().render("#select", {
    ...
    model: { 
        obj: user, 
        property: "UserName" 
    },
});
```

## Knockout Integration <a href="#knockout" id="knockout"></a>

When using [Knockout](https://knockoutjs.com), set the model attribute's `ko` value to the Knockout variable in order to keep the variable updated with changes.

```javascript
let user = ko.observable("jkratz");

const select = new wire.bsSelect().render("#select", {
    ...
    model: { ko: user },
});
```

For more on the `model` configuration attribute and observables, visit the [wire.ui.Component](/wirebootstrap/reference/wire.ui/wire.ui.component.md) reference page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wirebootstrap.com/wirebootstrap/working-with-components/configuration/observables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
