ng2-smart-table如何编辑弹出窗口

问题描述 投票:0回答:1

目前,当我在ng2-table上单击编辑时,我得到一个内联编辑选项。

但是,我想要发生的是,有一个弹出式可编辑框(示例图像用于添加,但对于只使用预填充数据和不同标题的编辑它将是相同的)

有没有办法做到这一点?

angular ng2-smart-table
1个回答
0
投票

将“mode:'external'”添加到您的设置对象中

HTML:

<ng2-smart-table [settings]="settings" (edit)="editRow($event)">

设置对象:

settings = {
    mode: 'external',
    edit: {
        editButtonContent: 'string_or_html'
    }
    columns: {...}
}

然后像这样使用它:

editRow(event) {
    console.log('event: ', event)
}
© www.soinside.com 2019 - 2024. All rights reserved.