fix(components): use item.id as fallback key in var-list

Ensure unique keys for list items by using item.id when available, falling back to index. This prevents potential React key conflicts during re-renders.
pull/22127/head
Mminamiyama 11 months ago
parent bb100e8228
commit b634e1b57d

@ -136,7 +136,7 @@ const VarList: FC<Props> = ({
})()
const variable = item.variable
return (
<div className={cn('flex items-center space-x-1', 'group relative')} key={index}>
<div className={cn('flex items-center space-x-1', 'group relative')} key={item.id || index}>
<Input
wrapperClassName='w-[120px]'
disabled={readonly}

Loading…
Cancel
Save