Skip to content

Commit 89e9b5f

Browse files
committed
🎨 #16334
1 parent 71a56db commit 89e9b5f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

app/src/protyle/render/av/gallery/render.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface ITableOptions {
3333
pageSizes: { [key: string]: string },
3434
query: string,
3535
oldOffset: number,
36+
left?: number,
3637
}
3738
}
3839

@@ -163,6 +164,9 @@ export const afterRenderGallery = (options: ITableOptions) => {
163164
if (options.resetData.alignSelf) {
164165
options.blockElement.style.alignSelf = options.resetData.alignSelf;
165166
}
167+
if (options.resetData.left) {
168+
options.blockElement.querySelector(".av__kanban").scrollLeft = options.resetData.left;
169+
}
166170
options.resetData.selectItemIds.find(selectId => {
167171
let itemElement = options.blockElement.querySelector(`.av__body[data-group-id="${selectId.groupId}"] .av__gallery-item[data-id="${selectId.fieldId}"]`) as HTMLElement;
168172
if (!itemElement) {
@@ -331,7 +335,13 @@ export const renderGallery = async (options: {
331335
}
332336
if (data.viewType === "kanban") {
333337
options.blockElement.setAttribute("data-av-type", data.viewType);
334-
renderKanban({blockElement: options.blockElement, protyle:options.protyle, cb:options.cb, renderAll:options.renderAll, data});
338+
renderKanban({
339+
blockElement: options.blockElement,
340+
protyle: options.protyle,
341+
cb: options.cb,
342+
renderAll: options.renderAll,
343+
data
344+
});
335345
return;
336346
}
337347
const view: IAVGallery = data.view as IAVGallery;

app/src/protyle/render/av/kanban/render.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export const renderKanban = async (options: {
155155
editIds,
156156
selectItemIds,
157157
pageSizes,
158+
left: options.blockElement.querySelector(".av__kanban")?.scrollLeft,
158159
};
159160
if (options.blockElement.firstElementChild.innerHTML === "") {
160161
options.blockElement.style.alignSelf = "";

0 commit comments

Comments
 (0)