adobe / adobe/react-webcomponent

byContentVal does not update in cases where there are no children

Đang mở
#14 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
104
Fork
20
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tìm decorator byContentVal và kiểm tra cách nó quan sát nội dung khi giá trị được decorator nằm ngay trên node thay vì trên một node con. Tái hiện ví dụ ButtonModel, thêm test case đã được hứa và xác nhận rằng việc thay đổi nội dung của node sẽ cập nhật label.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, react
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.