<div class='type'>Function</div>


<a id='references'></a>


<h2 id="onfilldata-label-action">onFillData</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun SemanticsPropertyReceiver.onFillData(
    label: String? = null,
    action: ((FillableData) -> Boolean)?,
)
```


Action that an autofill service can invoke to fill the component with data.

The `action` will be called by the system, passing the `FillableData` that should be used to
update the component's state.

This is the counterpart to the `fillableData` property, which is used to *provide* the
component's current data to the autofill service.

#### Parameters

| | |
| --- | --- |
| label | Optional label for this action. |
| action | Action to be performed when `SemanticsActions.OnFillData` is called. The lambda receives the `FillableData` from the autofill service. |