adobe / adobe/react-webcomponent

byContentVal does not update in cases where there are no children

未关闭
#14 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
104
派生
20
PR 合并指标
30 天内没有已合并 PR

描述

### 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

贡献指南

打开贡献指南

调研方向

定位 byContentVal 装饰器,并检查当被装饰的值位于节点本身而不是子节点上时,它如何观察内容。复现 ButtonModel 示例,添加承诺的测试用例,并确认更改节点内容会更新 label。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, react
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。