Я использую смарт-таблицу, и у меня есть раскрывающийся список в одном столбце. На основе выбранных значений в раскрывающемся списке я хочу отобразить другие столбцы в той же строке.
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>