fix(ui): use id for component key in control adapter components

This commit is contained in:
psychedelicious 2024-02-26 10:26:42 +11:00
parent ce3f9037cd
commit ff00ed8e80
3 changed files with 3 additions and 8 deletions

View File

@ -30,7 +30,7 @@ export const MetadataControlNets = ({ metadata }: Props) => {
<> <>
{controlNets.map((controlNet) => ( {controlNets.map((controlNet) => (
<MetadataViewControlNet <MetadataViewControlNet
key={controlNet.model.key} key={controlNet.id}
label={label} label={label}
controlNet={controlNet} controlNet={controlNet}
handlers={handlers.controlNets} handlers={handlers.controlNets}

View File

@ -29,12 +29,7 @@ export const MetadataIPAdapters = ({ metadata }: Props) => {
return ( return (
<> <>
{ipAdapters.map((ipAdapter) => ( {ipAdapters.map((ipAdapter) => (
<MetadataViewIPAdapter <MetadataViewIPAdapter key={ipAdapter.id} label={label} ipAdapter={ipAdapter} handlers={handlers.ipAdapters} />
key={ipAdapter.model.key}
label={label}
ipAdapter={ipAdapter}
handlers={handlers.ipAdapters}
/>
))} ))}
</> </>
); );

View File

@ -30,7 +30,7 @@ export const MetadataT2IAdapters = ({ metadata }: Props) => {
<> <>
{t2iAdapters.map((t2iAdapter) => ( {t2iAdapters.map((t2iAdapter) => (
<MetadataViewT2IAdapter <MetadataViewT2IAdapter
key={t2iAdapter.model.key} key={t2iAdapter.id}
label={label} label={label}
t2iAdapter={t2iAdapter} t2iAdapter={t2iAdapter}
handlers={handlers.t2iAdapters} handlers={handlers.t2iAdapters}