Disable row edit action if row isn't selected
- 主要言語
- TypeScript
- スター
- 1.6k
- フォーク
- 867
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
評価
この issue はまだ評価されていません。