# \[Coconut\] The "list" attribute of an "input" element is not rendered

**URL:** <https://community.haxe.org/t/coconut-the-list-attribute-of-an-input-element-is-not-rendered/3484>\
**Category:** Haxe\
**Tags:** coconut\
**Created:** [March 10, 2022, 10:57am UTC](https://community.haxe.org/t/coconut-the-list-attribute-of-an-input-element-is-not-rendered/3484 "2022-03-10T10:57:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cedx](https://community.haxe.org/user_avatar/community.haxe.org/cedx/32/2377_2.png) [@cedx](https://community.haxe.org/u/cedx)\
**Post date:** [March 10, 2022, 10:57am UTC](https://community.haxe.org/t/coconut-the-list-attribute-of-an-input-element-is-not-rendered/3484/1 "2022-03-10T10:57:35Z")

</div>

In a [Coconut](https://github.com/MVCoconut/coconut.ui) view, I have an `input` linked to a `datalist`:

```nohighlight
<input list="myDataList" ref=${myInput}/>
<datalist id="myDataList">
  <option value="aValue"/>
</datalist>

```

The issue is that the `datalist` does not work because the input’s `list` attribute is not rendered. So I must add it manually to fix it:

```haxe
override function viewDidMount()
  myInput.setAttribute("list", "myDataList");

```

How do I get this `list` attribute to be rendered without using the `viewDidMount` trick?

The `list` attribute as a bit special: it’s backed by a readonly JS property typed as `js.html.Element` (see [`HTMLInputElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement)).  
I guess the `list` attribute/property needs some specific handling in ([`coconut.vdom`](https://github.com/MVCoconut/coconut.vdom)? [`tink_hxx`](https://github.com/haxetink/tink_hxx)? [`tink_domspec`](https://github.com/haxetink/tink_domspec)?) but I don’t know where to start and I suck completely at macro code.
