我使用Clarity数据网格,我需要在某些条件下禁用复选框选择 . 我找不到API这样做 . 请帮助和谢谢 .
尚未在Clarity中禁用对数据网格的特定行的选择,但是会打开 Contributions welcome 问题:https://github.com/vmware/clarity/issues/1018
Contributions welcome
我有类似的要求,最后使用自定义指令实现行为 . 看看:https://plnkr.co/edit/5fQkvG?p=preview
@Directive({ selector: '[clrDisable]' }) export class DisableDirective implements OnInit, OnChanges { @Input('clrDisable') disabled:boolean constructor(private elementRef:ElementRef) { } ngOnInit(){ } ngOnChanges() { let nativeRef = this.elementRef.nativeElement; if(this.disabled) { nativeRef.classList.add("clr_disabled"); } else { nativeRef.classList.remove("clr_disabled"); } } } .clr_disabled{ pointer-events:none; background-color:#ccc; opacity:0.5; }
2 回答
尚未在Clarity中禁用对数据网格的特定行的选择,但是会打开
Contributions welcome
问题:https://github.com/vmware/clarity/issues/1018我有类似的要求,最后使用自定义指令实现行为 . 看看:https://plnkr.co/edit/5fQkvG?p=preview