AbsaOSS / AbsaOSS/cps-shared-ui
Support built-in disabling mechanism for reactive form controls instead of applying disabled attribute
- Ngôn ngữ chính
- TypeScript
- Star
- 9
- Fork
- 6
- Merge trung bình
- 23 giờ 46 phút
- Pull request đã merge (30 ngày)
- 5
Mô tả
```
It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
you. We recommend using this approach to avoid 'changed after checked' errors.
Example:
// Specify the `disabled` property at control creation time:
form = new FormGroup({
first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
last: new FormControl('Drew', Validators.required)
});
// Controls can also be enabled/disabled after creation:
form.get('first')?.enable();
form.get('last')?.disable();
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.