fix: [FL-107][ATP模型管理页面避雷器装设组合编辑时无法回显]
修复CreatableSingleSelect组件value判断逻辑,使用明确的null和undefined检查替代truthy判断,确保所有有效字符串值(包括空字符串)都能正确回显。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -27,7 +27,7 @@ export function CreatableSingleSelect({
|
||||
maxCount={1}
|
||||
options={options}
|
||||
placeholder={placeholder}
|
||||
value={value ? [value] : []}
|
||||
value={value !== null && value !== undefined ? [value] : []}
|
||||
onChange={(nextValue) => onChange?.(Array.isArray(nextValue) ? (nextValue.at(-1) ?? "") : "")}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user