문제: - 메인 화면(거래처 선택) → 첫 번째 모달(품목 선택) → 두 번째 모달(상세 입력) - selectedRowsData는 바로 이전 화면 데이터만 제공하여 2단계 이전 데이터 접근 불가 - customer_id가 NULL로 저장됨 해결: - modalDataStore의 전역 레지스트리에서 모든 누적 데이터 접근 - sourceTable에 따라 적절한 데이터 소스 자동 선택 - 거래처 데이터(customer_mng)를 modalDataStore에서 직접 가져옴 기술적 변경: - ButtonPrimaryComponent: allComponents에서 componentConfigs 수집 및 전달 - ButtonActionContext: componentConfigs 속성 추가 - handleBatchSave: modalDataStore에서 테이블별 데이터 조회 - parentDataMapping 로직: sourceTable 기반 데이터 소스 자동 감지 - 디버깅 로그 강화 (modalDataStore 키, 데이터 소스 추적) |
||
|---|---|---|
| .. | ||
| ButtonPrimaryComponent.tsx | ||
| ButtonPrimaryRenderer.tsx | ||
| README.md | ||
| config.ts | ||
| index.ts | ||
| types.ts | ||
README.md
ButtonPrimary 컴포넌트
button-primary 컴포넌트입니다
개요
- ID:
button-primary - 카테고리: action
- 웹타입: button
- 작성자: 개발팀
- 버전: 1.0.0
특징
- ✅ 자동 등록 시스템
- ✅ 타입 안전성
- ✅ Hot Reload 지원
- ✅ 설정 패널 제공
- ✅ 반응형 디자인
사용법
기본 사용법
import { ButtonPrimaryComponent } from "@/lib/registry/components/button-primary";
<ButtonPrimaryComponent
component={{
id: "my-button-primary",
type: "widget",
webType: "button",
position: { x: 100, y: 100, z: 1 },
size: { width: 120, height: 36 },
config: {
// 설정값들
}
}}
isDesignMode={false}
/>
설정 옵션
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| text | string | "버튼" | 버튼 텍스트 |
| actionType | string | "button" | 버튼 타입 |
| variant | string | "primary" | 버튼 스타일 |
| disabled | boolean | false | 비활성화 여부 |
| required | boolean | false | 필수 입력 여부 |
| readonly | boolean | false | 읽기 전용 여부 |
이벤트
onChange: 값 변경 시onFocus: 포커스 시onBlur: 포커스 해제 시onClick: 클릭 시
스타일링
컴포넌트는 다음과 같은 스타일 옵션을 제공합니다:
variant: "default" | "outlined" | "filled"size: "sm" | "md" | "lg"
예시
// 기본 예시
<ButtonPrimaryComponent
component={{
id: "sample-button-primary",
config: {
placeholder: "입력하세요",
required: true,
variant: "outlined"
}
}}
/>
개발자 정보
- 생성일: 2025-09-11
- CLI 명령어:
node scripts/create-component.js button-primary --category=action --webType=button - 경로:
lib/registry/components/button-primary/