Disable row edit action if row isn't selected
- Ngôn ngữ chính
- TypeScript
- Star
- 1.6k
- Fork
- 867
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm trying to **only** allow a user to select the edit action if they have selected the row. My table settings are set to **mode = inline** (default) and I can't change that as I'm using the editConfirm event.
Desired Effect Unselected row: http://prntscr.com/hyfqq2
Desired Effect Selected Row: http://prntscr.com/hyfots
I've tried hiding the actions in ngOnInit but I'm unable to retrieve the right HTML elements to do this.
ElementRef defined in constructor.
`constructor(private domElements: ElementRef)`
Attempt to hide element
```
var element = this.domElements.nativeElement.getElementsByClassName("ng2-smart-action ng2-smart-action-edit-edit")
element[0].addClass('hide');
```
However element[0] is undefined, is this the intended behaviour? And how can I fix this?
Or does ng2-smart-table have a better way to deal with this issue?
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á.