feat: confine conditions inside list to the same local list item (#863)

This commit is contained in:
Daniel Lautzenheiser
2023-09-06 12:05:39 -04:00
committed by GitHub
parent 82a8e11ab3
commit 5602812774
14 changed files with 319 additions and 60 deletions

View File

@ -207,6 +207,7 @@ const ListItem: FC<ListItemProps> = ({
locale={locale}
i18n={i18n}
forList={true}
listItemPath={`${path}.${objectField.name}`}
forSingleList={isSingleList}
/>
</ListItemWrapper>

View File

@ -69,8 +69,6 @@ const InsertLinkToolbarButton: FC<InsertLinkToolbarButtonProps> = ({
return;
}
console.log('editor.selection', editor.selection);
deleteText(editor, {
at: editor.selection as unknown as Location,
});

View File

@ -22,6 +22,7 @@ const ObjectControl: FC<WidgetControlProps<ObjectValue, ObjectField>> = ({
errors,
disabled,
value = {},
listItemPath,
}) => {
const objectLabel = useMemo(() => {
const summary = field.summary;
@ -59,6 +60,7 @@ const ObjectControl: FC<WidgetControlProps<ObjectValue, ObjectField>> = ({
locale={locale}
i18n={i18n}
forSingleList={forSingleList}
listItemPath={listItemPath}
/>
);
}) ?? null
@ -75,6 +77,7 @@ const ObjectControl: FC<WidgetControlProps<ObjectValue, ObjectField>> = ({
locale,
i18n,
forSingleList,
listItemPath,
]);
if (fields.length) {