angular - 如何根据智能表中下拉列表的选定值显示列中的值
问题描述
我正在使用智能表,并且在一列中有一个下拉列表。基于下拉列表中的选定值,我想在同一行中显示其他列。
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>
解决方案
我认为目前智能表不可能做到这一点,几周前我正在使用智能表,它无法满足我们的需要,所以我们从头开始制作了一张桌子以满足我们的要求,但为了得到它在功能上使用智能表并不难,但如果您需要/必须使用 ng2-smart-table,我建议在他们的 GitHub 页面https://github.com/akveo/ng2-smart-table上提出问题。
推荐阅读
- node.js - 使用 Node.js 和 Flutter 进行用户身份验证
- c++ - 静态内联函数中的函数局部静态对象不共享
- ios - 从firebase加载位置到MapView的Swift 5错误
- javascript - Javascript(html)Math.random()范围不起作用
- reactjs - react-bootstrap-table2 搜索不适用于格式化单元格
- python-3.x - 在 Pandas DataFrame 中加载 csv 文件时将字符串转换为设置数组
- python - 如何从另一个函数访问变量
- lua - 我想对其进行编码,以便当我在 roblox 中打开聊天并按下单词中包含字母“r”的内容时,我不会重置
- proto - 如何使用不同的文件导入正确运行 protoc?
- node.js - 使用 ELB 在 AWS EC2 上的套接字 IO net::ERR_CONNECTION_REFUSED