我的细胞中有一个细小的ui网格和下拉。为什么我的下拉列表没有显示点击?
var columnDefs1 = [
{ name: 'firstName'},
{ name: 'lastName'},
{ name: 'company'},
{ name: 'employed'},
{ name: '#',
cellTemplate:
'<div class="dropdown">' +
'<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">' +
'Dropdown' +
'<span class="caret"></span>' +
'</button>' +
'<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">' +
'<li><a href="#">Action</a></li>' +
'<li><a href="#">Another action</a></li>' +
'<li><a href="#">Something else here</a></li>' +
'<li role="separator" class="divider"></li>' +
'<li><a href="#">Separated link</a></li>' +
'</ul>' +
'</div>'
}
];
答案 0 :(得分:2)
你应该根据需要描述所需的列
columnDefs: [
{ name: 'name' },
{ name: 'age', type: 'number' },
{
name: 'gender',
editableCellTemplate: 'uiSelect',
editDropdownOptionsArray: [
'male',
'female',
'other'
]
}
]
这是一个工作样本:http://plnkr.co/edit/ckQhv5bWha2jte5wDBI1?p=preview