fix: keep the key unique to avoid sharing state among components

This commit is contained in:
xzdry 2022-09-15 16:43:07 +08:00
parent 569f708a8d
commit edf99e579b

View File

@ -38,7 +38,7 @@ export const ObjectField: React.FC<WidgetProps<ObjectFieldType>> = props => {
return shouldRender(subSpec.conditions || [], value) ? (
<SpecWidget
component={component}
key={name}
key={name + component.id}
spec={mergeWidgetOptionsIntoSpec<'core/v1/spec'>(
{
...subSpec,