adobe / adobe/react-webcomponent
byContentVal does not update in cases where there are no children
- Dominant language
- JavaScript
- Stars
- 104
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
### Expected Behaviour
A simple model like this should update if the contents of the node changes:
```
class ButtonModel extends DOMModel {
@byContentVal() label;
}
```
### Actual Behaviour
The initial contents of the DOM node is read, but the model does not respond to changes
### Reproduce Scenario (including but not limited to)
Any use of the `byContentVal` decorator that isn't in a child node
#### Steps to Reproduce
I will submit a PR that includes a test case
#### Platform and Version
Chrome 72, MacOS
#### Sample Code that illustrates the problem
I will submit a PR that includes a test case
#### Logs taken while reproducing problem
Contributor guide
Research direction
Locate the byContentVal decorator and inspect how it observes content when the decorated value is on the node itself rather than a child node. Reproduce the ButtonModel example, add the promised test case, and confirm that changing the node contents updates label.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100