akveo / akveo/ngx-admin

Table action column issue

オープン
#6,050 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
25.7k
フォーク
7.9k
PR マージ指標
30日以内にマージされた PR はありません

説明

I’ve created a table using ng2-smart-table and configured the (userRowSelect) event. Here are the key settings I’ve applied:
```
hideSubHeader: true,
actions: {
add: false,
edit: false,
delete: false,
}
```
At the end of the table, I’ve added a **custom** “Action” column that displays an icon.
```
columns: {
id: { title: 'ID', type: 'number' },
accoutNumber: { title: 'Account Name', type: 'string' },
currentBalance: { title: 'Current Balance', type: 'string' },
mobile: { title: 'Mobile', type: 'string' },
email: { title: 'E-mail', type: 'string' },
actions: {
title: 'Action',
type: 'custom',
renderComponent: ActionIconComponent,
filter: false,
sort: false,
width: '50px',
class: 'action-column-class'

}
```
The issue I’m facing:
When I click on the icon in the Action column, the (userRowSelect) event gets triggered. However, I don't want to prevent that — I only want the icon click to open an action context menu, without triggering the row selection event.

Unfortunately, it seems like ng2-smart-table’s current behavior doesn’t allow for this kind of selective click handling.

If anyone has ideas or workarounds on how to achieve this, I’d appreciate your suggestions!

![Image](https://github.com/user-attachments/assets/05f2a565-24b4-4a99-85c9-c8a888c34f3c)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。