fix: 컴포넌트 등록 및 entity-search 검증 개선

- 컴포넌트 등록을 useEffect → 즉시 실행으로 변경 (3개 컴포넌트)
- entity-search-input tableName 검증 추가 (FE/BE)
- DynamicComponentRenderer에서 componentConfig props 전달 수정
- EntitySearchModal key prop 경고 해결
- 불필요한 ScreenDesigner 렌더링 코드 제거

Fixes: 컴포넌트 미등록 에러, tableName undefined 500 에러, React key 경고
This commit is contained in:
SeongHyun Kim
2025-11-17 16:48:42 +09:00
parent 6839deac97
commit 23cd677413
10 changed files with 50 additions and 68 deletions

View File

@@ -155,17 +155,19 @@ export function EntitySearchModal({
</td>
</tr>
) : (
results.map((item, index) => (
<tr
key={item[valueField] || index}
className="border-t hover:bg-accent cursor-pointer transition-colors"
onClick={() => handleSelect(item)}
>
{displayColumns.map((col, colIndex) => (
<td key={`${item[valueField] || index}-${col}-${colIndex}`} className="px-4 py-2">
{item[col] || "-"}
</td>
))}
results.map((item, index) => {
const uniqueKey = item[valueField] !== undefined ? `${item[valueField]}` : `row-${index}`;
return (
<tr
key={uniqueKey}
className="border-t hover:bg-accent cursor-pointer transition-colors"
onClick={() => handleSelect(item)}
>
{displayColumns.map((col) => (
<td key={`${uniqueKey}-${col}`} className="px-4 py-2">
{item[col] || "-"}
</td>
))}
<td className="px-4 py-2">
<Button
size="sm"
@@ -180,7 +182,8 @@ export function EntitySearchModal({
</Button>
</td>
</tr>
))
);
})
)}
</tbody>
</table>