@uniai-fe/uds-primitives 0.3.52 → 0.3.53
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
|
@@ -56,12 +56,16 @@ const SelectTriggerSelected = ({
|
|
|
56
56
|
|
|
57
57
|
// 2) placeholder/label은 text input에 들어갈 수 있는 문자열로 정규화한다.
|
|
58
58
|
const resolvedPlaceholder = toInputText(placeholder);
|
|
59
|
-
|
|
59
|
+
// 변경 설명: readOnly + customOptions 조합에서 valueText가 비어도 inputProps.value를 표시 문자열로 사용한다.
|
|
60
|
+
const resolvedInputValueText = toInputText(inputProps?.value as ReactNode);
|
|
61
|
+
const resolvedLabelText =
|
|
62
|
+
valueText || resolvedInputValueText || toInputText(label);
|
|
60
63
|
const isLabelTextLike =
|
|
61
64
|
typeof label === "string" || typeof label === "number";
|
|
62
65
|
// 변경 설명: readOnly에서 non-text label을 직접 렌더링하되, placeholder 상태일 때는 input placeholder 경로를 유지한다.
|
|
66
|
+
// custom mode처럼 valueText가 있는 경우에는 input 렌더 경로를 유지해 값 표시를 보장한다.
|
|
63
67
|
const shouldRenderReadonlyLabelNode =
|
|
64
|
-
readOnly && !isLabelTextLike && !isPlaceholder;
|
|
68
|
+
readOnly && !isLabelTextLike && !isPlaceholder && !resolvedLabelText;
|
|
65
69
|
|
|
66
70
|
// 3) custom mode 활성 시에만 label input focus를 부여한다.
|
|
67
71
|
useEffect(() => {
|