feat(M01): 거름 컨테이너 펼치면 전체 · 닫아도 거름·찾기·쪽 유지
- 인력·기계·소요량·계수·로직 펼치면 전체(또는 닫기 전 거름)가 바로 열림 - 닫을 때는 화면 그대로 · 컨테이너마다 찾기 글·쪽을 sessionStorage 에 따로 기억 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { createButton, el, showToast } from "@ui/ui_template_elements";
|
||||
import { t as L } from "@ui/ui_template_locale";
|
||||
import { openPickModal } from "./M01_MasterData_UI_Pick";
|
||||
import type { Pick } from "./M01_MasterData_UI_Side";
|
||||
import { saveView, type Pick } from "./M01_MasterData_UI_Side";
|
||||
import { fetchRows, type Row, type RowsPage } from "./M01_MasterData_Api_Fetch";
|
||||
import {
|
||||
addRow,
|
||||
@@ -92,7 +92,7 @@ const remember = (ref: string | null, name?: string): void => {
|
||||
export function renderRows(host: HTMLElement, pick: Pick, q: string): () => void {
|
||||
const { sub, detail, state } = pick;
|
||||
const file = pick.file.file;
|
||||
let page = 1;
|
||||
let page = pick.view?.page ?? 1;
|
||||
let data: RowsPage | null = null;
|
||||
let unlinked = false;
|
||||
|
||||
@@ -235,6 +235,7 @@ export function renderRows(host: HTMLElement, pick: Pick, q: string): () => void
|
||||
try {
|
||||
data = await fetchRows(file, page, SIZE, q, unlinked, sub, detail, state);
|
||||
for (const [key, name] of Object.entries(data.refs ?? {})) names.set(key, name);
|
||||
saveView(pick.group, { page: data.page });
|
||||
paint();
|
||||
} catch (error) {
|
||||
showToast(error instanceof Error ? error.message : L("M01_LoadFailed"), "error");
|
||||
|
||||
Reference in New Issue
Block a user