@uniai-fe/uds-templates 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -42,33 +42,30 @@ export function ModalContainer({
|
|
|
42
42
|
"--modal-dialog-body-padding": stylePaddingSize("rem", padding),
|
|
43
43
|
} as CSSProperties)
|
|
44
44
|
: undefined;
|
|
45
|
+
// 변경: 인라인 함수 컴포넌트 대신 조건부 JSX wrapper로 감싸 form subtree 리마운트를 막는다.
|
|
46
|
+
const container = (
|
|
47
|
+
<div
|
|
48
|
+
className={clsx("uds-modal-container", className)}
|
|
49
|
+
// 변경 설명: Dialog 기본 submit 동작에서 현재 스택의 form을 조회하기 위한 식별자다.
|
|
50
|
+
data-modal-stack-key={stackKey}
|
|
51
|
+
>
|
|
52
|
+
{header ? <ModalHeaderContainer>{header}</ModalHeaderContainer> : null}
|
|
53
|
+
<ModalBody style={bodyStyle}>{body}</ModalBody>
|
|
54
|
+
{footer ? <div className="uds-modal-footer">{footer}</div> : null}
|
|
55
|
+
{!footer && footerButtons && footerButtons.length ? (
|
|
56
|
+
<div className="uds-modal-footer">
|
|
57
|
+
<ModalFooterButtonWrapper
|
|
58
|
+
stackKey={stackKey}
|
|
59
|
+
buttons={footerButtons}
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
) : null}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
45
65
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
children
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<ContextProvider>
|
|
55
|
-
<div
|
|
56
|
-
className={clsx("uds-modal-container", className)}
|
|
57
|
-
// 변경 설명: Dialog 기본 submit 동작에서 현재 스택의 form을 조회하기 위한 식별자다.
|
|
58
|
-
data-modal-stack-key={stackKey}
|
|
59
|
-
>
|
|
60
|
-
{header ? <ModalHeaderContainer>{header}</ModalHeaderContainer> : null}
|
|
61
|
-
<ModalBody style={bodyStyle}>{body}</ModalBody>
|
|
62
|
-
{footer ? <div className="uds-modal-footer">{footer}</div> : null}
|
|
63
|
-
{!footer && footerButtons && footerButtons.length ? (
|
|
64
|
-
<div className="uds-modal-footer">
|
|
65
|
-
<ModalFooterButtonWrapper
|
|
66
|
-
stackKey={stackKey}
|
|
67
|
-
buttons={footerButtons}
|
|
68
|
-
/>
|
|
69
|
-
</div>
|
|
70
|
-
) : null}
|
|
71
|
-
</div>
|
|
72
|
-
</ContextProvider>
|
|
66
|
+
return typeof formContextOptions !== "undefined" ? (
|
|
67
|
+
<Form.Provider options={formContextOptions}>{container}</Form.Provider>
|
|
68
|
+
) : (
|
|
69
|
+
container
|
|
73
70
|
);
|
|
74
71
|
}
|