React 制表器 - 特定选择列的标题过滤器 - 删除'X'



在react tabulator列上,可以删除标头过滤器上的clear‘x’选项吗?

问题:如果他们单击"X",则会按预期清除筛选器,但如果他们为另一个列表项单击同一筛选器,则不会加载列表。

如果他们只点击列表项而不点击"X",效果很好
列:

{
title: 'Column',
field: 'Column',
headerFilter: 'select',
headerFilterParams: {
values: true,
sortValuesList: 'asc',
},
width: 125,
}

我已经将其包含在整个页面的CSS代码中,以删除"X"删除选项,但我只对更改特定标题感兴趣,而不是全部。所有列都是输入搜索类型。

`input[type='search']::-ms-clear {display: none;width: 0;height: 0;}input[type='search']::-ms-reveal {display: none;width: 0;height: 0;}

input[type='search']::-webkit-search-decoration,input[type='search']::-webkit-search-cancel-button,input[type='search']::-webkit-search-results-button,input[type='search']::-webkit-search-results-decoration {display: none;`

我也玩过内置的标题格式化程序和表格,但无法使其工作。

这可能是Tabulator中的一个错误。我已使用blur来解决此问题。。

Tabulator.extendModule("edit", "editors", {
select: function (cell, onRendered, success, cancel, options) {
let inputElement = SelectEditor.call(
this,
cell,
onRendered,
success,
cancel,
options
);

let listener = function (event) {
inputElement.blur();
};
inputElement.addEventListener("search", listener);
return inputElement;
}
});

查看我的CodeSandBox

此外,您也可以在Tabulator Github 上报告

最新更新