Support two-way biding for 'value' property for custom elements
See original GitHub issueDescription
Right now, is not possible to add a two-way biding to the property ‘value’ of a custom element, you can do a two-way biding to the attribute value, but attribute value and property value are not the same:
When you try to bind to the property value an exception is displayed:
Uncaught (in promise) DOMException: Failed to execute 'setAttribute' on 'Element': '@bind' is not a valid attribute name.
at e.applyAttribute (https://localhost:44395/_framework/blazor.server.js:8:37951)
at e.insertElement (https://localhost:44395/_framework/blazor.server.js:8:37062)
at e.insertFrame (https://localhost:44395/_framework/blazor.server.js:8:35939)
at e.insertFrameRange (https://localhost:44395/_framework/blazor.server.js:8:39834)
at e.insertElement (https://localhost:44395/_framework/blazor.server.js:8:37019)
at e.insertFrame (https://localhost:44395/_framework/blazor.server.js:8:35939)
at e.applyEdits (https://localhost:44395/_framework/blazor.server.js:8:34325)
at e.updateComponent (https://localhost:44395/_framework/blazor.server.js:8:33641)
at Object.t.renderBatch (https://localhost:44395/_framework/blazor.server.js:1:70742)
at e.<anonymous> (https://localhost:44395/_framework/blazor.server.js:19:18070)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Implement two-way data binding for custom property
The [(x)] syntax is easy to demonstrate when the element has a settable property called x and a corresponding event named xChange ....
Read more >Support two-way-data-binding with custom-input-elements
Is the goal to make bind:value compatible with all custom elements? It seems like once you get to the point of needing to...
Read more >Two-way binding
Two -way binding gives components in your application a way to share data. ... The following sizerComponent has a size value property and...
Read more >Angular — Custom two way data binding | by Preethi
Property Binding The square bracket tells the angular to evaluate the expression given in the right hand side and it is a...
Read more >How to create your own two-way data bindings with custom ...
A simple trick on how to create your own data bindings with custom components in #angular. ➡️At Hackages, our aim is to connect...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
After further discussion, this might need some design work to implement.
This should be possible, although we need to document it. Parking this as a doc item.