# ParentDataModifierNode

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ParentDataModifierNode.kt+class:androidx.compose.ui.node.ParentDataModifierNode) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface ParentDataModifierNode : DelegatableNode
  ```

*** ** * ** ***

A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that provides data to the parent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)`. This can be read from within the the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)` during measurement and positioning, via `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/IntrinsicMeasurable#parentData()`. The parent data is commonly used to inform the parent how the child `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)` should be measured and positioned.

This is the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` equivalent of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ParentDataModifier`

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode#(androidx.compose.ui.unit.Density).modifyParentData(kotlin.Any)(parentData: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Provides a parentData, given the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode#(androidx.compose.ui.unit.Density).modifyParentData(kotlin.Any)` already provided through the modifier's chain. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode#(androidx.compose.ui.node.ParentDataModifierNode).invalidateParentData()()` This invalidates the current node's parent data, and ensures that layouts that utilize it will be scheduled to relayout for the next frame. | Cmn |

### Inherited functions

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onDensityChange()()`

Invoked when the density changes for this node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onLayoutDirectionChange()()`

Invoked when the layout direction changes for this node.
Cmn

### Inherited properties

From [androidx.compose.ui.node.DelegatableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode) `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#node()`

A reference of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that holds this node's position in the node hierarchy.
Cmn

## Public functions

### Density.modifyParentData

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ParentDataModifierNode.kt+function:modifyParentData) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0)

```
fun Density.modifyParentData(parentData: Any?): Any?
```

Provides a parentData, given the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode#(androidx.compose.ui.unit.Density).modifyParentData(kotlin.Any)` already provided through the modifier's chain.

## Extension functions

### ParentDataModifierNode.invalidateParentData

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ParentDataModifierNode.kt+function:invalidateParentData)

```
fun ParentDataModifierNode.invalidateParentData(): Unit
```

This invalidates the current node's parent data, and ensures that layouts that utilize it will be scheduled to relayout for the next frame.