制表器-选择不清除选定值的下拉列表



我遇到了一个问题,它阻止我清除下拉列表中选择的选项。在这个例子中,我使用了字段OEM,它是配置的下拉字段(列表编辑器)。一个下拉菜单打开了所有要选择的值,以及我在editorParams中添加的clear选项,它在选择选项旁边生成一个x,你可以在我发布的gif中看到。然而,它不允许我点击它,因为编辑似乎失去焦点的时刻,我点击该按钮,不再处于可编辑状态。

有什么建议可以解决吗?

选择"清除问题">

制表器版本:5.2.7

制表机的构造函数:

var quote_tracker = new Tabulator("#quote_tracker", {
ajaxURL: "https://"+"<?php echo $host;?>/data/getQuotes.php", //ajax URL
height: "82vh", 
layout: "fitColumns", 
//selectable: 1,
pagination:true, 
paginationButtonCount:3,
paginationSize:2000, 
paginationCounter:"rows",
initialSort:[
{column:"quote_id", dir:"desc"}
],
columns: [ //Define Table Columns
{ title: "Quote #", field: "quote_id", sorter:"number",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true, editable:false, contextMenu:cellContextMenu},
{ title: "Sales Person", field: "sales_person" ,sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true, editable:false, contextMenu:cellContextMenu},
{ title: "Customer", field: "customer",sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true,widthGrow:2, editable:false, contextMenu:cellContextMenu},
{ title: "OEM", field: "oem", sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true, editable:false, contextMenu:cellContextMenu,editor:"list",
editorParams:{values:oems,sort:"asc",clearable:true},
cellDblClick:function(e, cell){
cell.edit(editPerms);
}},
{ title: "Program", field: "program",sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true, editable:false, contextMenu:cellContextMenu,editable:false,editor:"input",
cellDblClick:function(e, cell){
cell.edit(editPerms);
}},
{ title: "Description", field: "description",sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true,widthGrow:2,editable:false,editor:"input", contextMenu:cellContextMenu,
validator:function(cell,value){
if(value.trim() == ""){
return false;
} else {
return true;
}
},
cellDblClick:function(e, cell){
cell.edit(editPerms);
}},
{ title: "Contact", field: "contact",sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true,editable:false,editor:"input", contextMenu:cellContextMenu,
cellDblClick:function(e, cell){
cell.edit(editPerms);
}},
{ title: "Location", field: "folder_location",sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true,widthGrow:2, editable:false,contextMenu:cellContextMenu},
{ title: "Comments", field: "comments", sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true ,widthGrow:2,editable:false,editor:"input",contextMenu:cellContextMenu,
cellDblClick:function(e, cell){
cell.edit(editPerms);
}},
{ title: "Created Date", field: "create_date", sorter:"string",sorterParams:{alignEmptyValues:"bottom"}, hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true, editable:false, contextMenu:cellContextMenu, formatter:"datetime", formatterParams:{inputFormat:"yyyy-MM-dd HH:mm:ss",outputFormat:"yyyy-MM-dd"}},
//{ title: "Created By", field: "created_by", hozAlign: "center", headerHozAlign: "center", tooltip: true, headerTooltip: true },
],
});

升级到制表器5.3版已解决此问题。

最新更新