🎃
[wip]angular ラジオボタンで有効切替
ラジオボタンのイベント
html
<p-radioButton ... [(ngModel)]="selectedCategory" (onClick)="clickRadio()" />
ts
selectedCategory: any = null;
flag: boolean = true;
ngOnInit() {
console.log('[ngOnInit] execute');
this.selectedCategory = this.categories[0];
this.setCurrentClasses();
}
clickRadio() {
this.flag = this.selectedCategory.key == 'A';
}
有効切替
disabledをflagで切り替える。
<p-radioButton ... [disabled]="flag" />
ag-grid チェックボックス無効化
gridOptions: GridOptions = {
rowSelection: {
mode: 'multiRow',
headerCheckbox: false,
checkboxes: (params) => false,
},
}
Discussion