This commit is contained in:
Vanessa 2024-03-04 21:52:29 +08:00
parent 220e0b137f
commit 30db8f4eb0
4 changed files with 5 additions and 5 deletions

View file

@ -65,7 +65,7 @@ export const setFilter = async (options: {
if (rectTarget.height === 0) {
rectTarget = options.protyle.wysiwyg.element.querySelector(`[data-col-id="${options.target.dataset.colId}"]`).getBoundingClientRect();
}
const blockID = options.blockElement.getAttribute("data-node-id")
const blockID = options.blockElement.getAttribute("data-node-id");
const menu = new Menu("set-filter-" + options.filter.column, () => {
const oldFilters = JSON.parse(JSON.stringify(options.data.view.filters));
const selectElement = menu.element.querySelector(".b3-select") as HTMLSelectElement;
@ -510,7 +510,7 @@ export const addFilter = (options: {
operator: getDefaultOperatorByType(column.type),
value: cellValue,
type: column.type
}
};
options.data.view.filters.push(filter);
options.menuElement.innerHTML = getFiltersHTML(options.data.view);
setPosition(options.menuElement, options.tabRect.right - options.menuElement.clientWidth, options.tabRect.bottom, options.tabRect.height);

View file

@ -715,7 +715,7 @@ export const openMenuPanel = (options: {
id,
blockID
}]);
options.blockElement.setAttribute(Constants.CUSTOM_SY_AV_VIEW, id)
options.blockElement.setAttribute(Constants.CUSTOM_SY_AV_VIEW, id);
avPanelElement.remove();
event.preventDefault();
event.stopPropagation();

View file

@ -169,7 +169,7 @@ const updatePageSize = (options: {
return;
}
options.nodeElement.setAttribute("data-page-size", options.newPageSize);
const blockID = options.nodeElement.getAttribute("data-node-id")
const blockID = options.nodeElement.getAttribute("data-node-id");
transaction(options.protyle, [{
action: "setAttrViewPageSize",
avID: options.avID,

View file

@ -57,7 +57,7 @@ export const openViewMenu = (options: { protyle: IProtyle, blockElement: HTMLEle
id,
blockID: options.blockElement.dataset.nodeId
}]);
options.blockElement.setAttribute(Constants.CUSTOM_SY_AV_VIEW, id)
options.blockElement.setAttribute(Constants.CUSTOM_SY_AV_VIEW, id);
}
});
menu.addItem({