aurelia / aurelia/framework

Cannot bind to list attribute of input element

Open
#646 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
11.7k
Forks
608
PR merge metrics
No merged PRs in 30d

Description

Hi,

**I'm submitting a bug report**
- **Library Version:**
1.0.5
- **Browser:**
Chrome 54 on Windows 7

**Current behavior:**
If I place the following in a template file: (where listIdVar is a string variable with any value)

```


```

I get the following error:
`TypeError: Cannot assign to read only property 'list' of object '#'`
Same happens if I use `list="prefix-${listIdVar}"` instead.

**Expected/desired behavior:**
I wanted regular one-way binding from my variable to the "list" attribute of the input element.
However, it seems that aurelia tries to do this via assigning to the read-only 'list' property.
Per http://stackoverflow.com/questions/24925336/set-html5-input-list-value-with-javascript, it seems the correct way to do this is via setAttribute.

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.