mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
71a56db7aa
commit
89e9b5f124
2 changed files with 12 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ interface ITableOptions {
|
||||||
pageSizes: { [key: string]: string },
|
pageSizes: { [key: string]: string },
|
||||||
query: string,
|
query: string,
|
||||||
oldOffset: number,
|
oldOffset: number,
|
||||||
|
left?: number,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,6 +164,9 @@ export const afterRenderGallery = (options: ITableOptions) => {
|
||||||
if (options.resetData.alignSelf) {
|
if (options.resetData.alignSelf) {
|
||||||
options.blockElement.style.alignSelf = options.resetData.alignSelf;
|
options.blockElement.style.alignSelf = options.resetData.alignSelf;
|
||||||
}
|
}
|
||||||
|
if (options.resetData.left) {
|
||||||
|
options.blockElement.querySelector(".av__kanban").scrollLeft = options.resetData.left;
|
||||||
|
}
|
||||||
options.resetData.selectItemIds.find(selectId => {
|
options.resetData.selectItemIds.find(selectId => {
|
||||||
let itemElement = options.blockElement.querySelector(`.av__body[data-group-id="${selectId.groupId}"] .av__gallery-item[data-id="${selectId.fieldId}"]`) as HTMLElement;
|
let itemElement = options.blockElement.querySelector(`.av__body[data-group-id="${selectId.groupId}"] .av__gallery-item[data-id="${selectId.fieldId}"]`) as HTMLElement;
|
||||||
if (!itemElement) {
|
if (!itemElement) {
|
||||||
|
|
@ -331,7 +335,13 @@ export const renderGallery = async (options: {
|
||||||
}
|
}
|
||||||
if (data.viewType === "kanban") {
|
if (data.viewType === "kanban") {
|
||||||
options.blockElement.setAttribute("data-av-type", data.viewType);
|
options.blockElement.setAttribute("data-av-type", data.viewType);
|
||||||
renderKanban({blockElement: options.blockElement, protyle:options.protyle, cb:options.cb, renderAll:options.renderAll, data});
|
renderKanban({
|
||||||
|
blockElement: options.blockElement,
|
||||||
|
protyle: options.protyle,
|
||||||
|
cb: options.cb,
|
||||||
|
renderAll: options.renderAll,
|
||||||
|
data
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const view: IAVGallery = data.view as IAVGallery;
|
const view: IAVGallery = data.view as IAVGallery;
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ export const renderKanban = async (options: {
|
||||||
editIds,
|
editIds,
|
||||||
selectItemIds,
|
selectItemIds,
|
||||||
pageSizes,
|
pageSizes,
|
||||||
|
left: options.blockElement.querySelector(".av__kanban")?.scrollLeft,
|
||||||
};
|
};
|
||||||
if (options.blockElement.firstElementChild.innerHTML === "") {
|
if (options.blockElement.firstElementChild.innerHTML === "") {
|
||||||
options.blockElement.style.alignSelf = "";
|
options.blockElement.style.alignSelf = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue