refactor: UniversalListPage externalIsLoading 지원 및 스켈레톤 개선
- UniversalListPage에 externalIsLoading prop 추가 - CardTransactionDetailClient DevFill 자동입력 기능 추가 - 여러 컴포넌트 로딩 상태 처리 개선 - skeleton 컴포넌트 확장 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,7 @@ export function UniversalListPage<T>({
|
||||
onTabChange,
|
||||
onSearchChange,
|
||||
onFilterChange: onFilterChangeCallback,
|
||||
externalIsLoading,
|
||||
}: UniversalListPageProps<T>) {
|
||||
const router = useRouter();
|
||||
const params = useParams();
|
||||
@@ -593,8 +594,8 @@ export function UniversalListPage<T>({
|
||||
renderMobileCard={renderMobileCard}
|
||||
// 페이지네이션
|
||||
pagination={paginationConfig}
|
||||
// 로딩 상태
|
||||
isLoading={isLoading}
|
||||
// 로딩 상태 (외부 로딩 상태 우선 사용)
|
||||
isLoading={externalIsLoading ?? isLoading}
|
||||
/>
|
||||
|
||||
{/* 삭제 확인 다이얼로그 */}
|
||||
|
||||
@@ -377,6 +377,13 @@ export interface UniversalListPageProps<T> {
|
||||
* - 외부에서 API 호출 후 데이터 갱신 가능
|
||||
*/
|
||||
onFilterChange?: (filters: Record<string, string | string[]>) => void;
|
||||
/**
|
||||
* 외부 로딩 상태 (서버 사이드 데이터 페칭용)
|
||||
* - 설정 시 내부 isLoading 대신 사용
|
||||
* - 부모 컴포넌트에서 데이터 로딩 상태를 직접 관리할 때 사용
|
||||
* - IntegratedListTemplateV2로 전달되어 스켈레톤 표시에 사용
|
||||
*/
|
||||
externalIsLoading?: boolean;
|
||||
}
|
||||
|
||||
// ===== 내부 상태 타입 =====
|
||||
|
||||
Reference in New Issue
Block a user