gpt4 book ai didi

javascript - Jquery jTable - 如何添加多选下拉列表?

转载 作者:行者123 更新时间:2023-11-30 17:13:19 26 4
gpt4 key购买 nike

我想为字段添加多选功能。这是我当前配置 jtable 的代码。如何实现指定字段的多选功能

fields: {
firstName: {
title: 'name',
width: '20%'
},
surname: {
title: 'surname',
width: '20%'
},
userName: {
title: 'username',
width: '20%',
key: true,
create: true
},
enabled: {
title: 'status',
type: 'radiobutton',
options: [
{Value: true, DisplayText: 'enabled'},
{Value: false, DisplayText: 'disabled'}
],
width: '20%'
},
roles: {
/***********************************************
// i wanna to enable multi-select for this field
/***********************************************
title: 'roles',
options: [
{Value: "ROLE_ADMIN", DisplayText: "admin"},
{Value: "ROLE_USER", DisplayText: "user"}
]
}
}

最佳答案

字段类型应该是multiselectddl

确保您使用的是此存储库中可用的 jTable 文件

https://github.com/stanleyta/jtable/commit/6876303615a239dc409dee481a877a8f934f340d

关于javascript - Jquery jTable - 如何添加多选下拉列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26573069/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com