akveo / akveo/ng2-smart-table

Disable row edit action if row isn't selected

Đang mở
#667 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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á.

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.