问题描述
我在表格单元格内使用多选下拉列表。 但是当我点击它时,选项隐藏在它下方单元格的内容后面。
我究竟做错了什么?
$('#example-getting-started').multiselect({
buttonWidth: '700px',
maxHeight: 200,
buttonText: function(options, select) {
var labels = [];
options.each(function() {
if ($(this).attr('label') !== undefined) {
labels.push($(this).attr('label'));
} else {
labels.push($(this).html());
}
});
return labels.join(', ') + '';
}
});
<div id="attachedInfoOpts">
<select id="example-getting-started" multiple="multiple">
<option value="Breating Exercises" selected="selected">Breating Exercises</option>
<option value="Prescription">Prescription</option>
<option value="Health Dieting Information" selected="selected">Healthy Dieting Information</option>
<option value="Health Dieting Information" selected="selected">Healthy Dieting Information</option>
</select>
</div>
1楼
Max
1
2015-07-31 00:01:18
添加
Overflow: visible;
到周围的Container。
2楼
Pedro Alvares
0
2020-11-02 17:29:47
尝试将 appendTo="body" 作为属性添加到 p-multiSelect。
结果应如下所示:
<p-multiSelect appendTo="body" *ngSwitchCase="'color'" [options]="colors" defaultLabel="All Colors" (onChange)="dt.filter($event.value, col.field, 'in')"></p-multiSelect>
我遇到了这个问题,添加这个属性为我解决了这个问题。