# HasSelectableChildren

> Provides deferred child rendering so the parent selection state applies at render time.

[API reference](/docs/api/index.md) › [HTML](/docs/extensions/html/reference/index.md) › [Form](/docs/extensions/html/reference/form/index.md) › [Mixin](/docs/extensions/html/reference/form/mixin/index.md) › HasSelectableChildren

| trait | `UIAwesome\Html\Form\Mixin\HasSelectableChildren` |
| --- | --- |
| Source | [`src/Form/Mixin/HasSelectableChildren.php`](https://github.com/ui-awesome/html/blob/main/src/Form/Mixin/HasSelectableChildren.php#L24) |

Used by 2 types:

- [`UIAwesome\Html\Form\Optgroup`](/docs/extensions/html/reference/form/optgroup/index.md)
- [`UIAwesome\Html\Form\Select`](/docs/extensions/html/reference/form/select/index.md)

Provides deferred child rendering so the parent selection state applies at render time.

Appending a child writes a placeholder into the content instead of its markup, which keeps the child mutable until
the element renders and preserves its position relative to content added through [`HasContent::content()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-content) and
[`HasContent::html()`](/docs/extensions/html-mixin/reference/hascontent/index.md#method-html).