繁体   English   中英

如何根据智能表中下拉列表的选定值显示列中的值

[英]How to display values in columns based on selected values of dropdown in smart table

我正在使用智能表,我在一列中有一个下拉列表。根据下拉列表中的选定值,我想在同一行中显示其他列。

variablesList = [
{ value: "1", title: 'A',description: "", response: 'Integer'},
{ value: "2", title: 'B' , description: "", response: 'Boolean'},
{ value: "3", title: 'C', description: "", response: 'Integer' }
];

columnInfo = {
actions: {
edit: true, add: true,
},
columns: {
name: {
title: 'Variables',
filter: false,
type: 'html',
editor: {
type: 'list',
config: {
list:
this.variablesList,
},
}
},
description: {
title: 'Description',
filter: false,
},
response: {
filter: false,
title: 'Response Type',
},
},
attr: {
class: "table table-responsive"
},
edit:{
editButtonContent: ''
},
delete: {
deleteButtonContent: ''
},
};

这是我的智能桌子。

<ng2-smart-table [settings]="columnInfo" [source]="variableSource">
                </ng2-smart-table>

我认为目前使用智能表是不可能的,几周前我正在使用smart-table而且它无法满足我们的需要,所以我们从头开始制作一个表来满足我们的要求但是要得到它在功能上使用智能表它根本不难,但如果你需要/必须使用ng2-smart-table,我建议在他们的GitHub页面上提出一个问题https://github.com/akveo/ng2-smart-table

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM