需要自定义筛选功能,现在实现了点击筛选显示筛选图标,但是无法再隐藏筛选图标了,现在想要自定义隐藏筛选图标怎么实现
const setFilterClick = () => {
const designerDom = document.getElementById("designer");
if (designerDom) {
const designer =
DesignerGC.Spread.Sheets.Designer.findControl(designerDom);
const spreads = designer?.getWorkbook();
// @ts-ignore
const sheet = spreads.getActiveSheet();
const currentSelect = sheet.getSelections();
const style = new GC.Spread.Sheets.Style();
const rowCount = sheet.getRowCount();
const colCount = sheet.getColumnCount();
var cellrange = new GC.Spread.Sheets.Range(3, 0, rowCount, colCount);
var hideRowFilter = new GC.Spread.Sheets.Filter.HideRowFilter(
cellrange
);
var filter = sheet.rowFilter(hideRowFilter);
sheet.repaint();
hideRowFilter.filterDialogVisibleInfo({
sortByValue: true,
sortByColor: false,
filterByColor: true,
filterByValue: true,
listFilterArea: true,
});
}
};
|
|