Merge branch 'main' into next

This commit is contained in:
GitHub Actions Bot 2024-08-12 02:16:33 +00:00
commit 7f258ac62b
2 changed files with 6 additions and 4 deletions

View File

@ -1277,7 +1277,9 @@ export const useAssociationFilterBlockProps = () => {
if (!isOptionalField(collectionField)) {
run();
}
}, [collectionField, labelKey, run, valueKey]);
// do not format the dependencies
}, [collectionField, labelKey, run, valueKey, field.componentProps?.params, field.componentProps?.params?.sort]);
if (!collectionField) {
return {};

View File

@ -48,7 +48,7 @@ export const AssociationFilterItem = withDynamicSchemaProps(
const defaultActiveKeyCollapse = useMemo<React.Key[]>(
() => (defaultCollapse && collectionField?.name ? [collectionField.name] : []),
[],
[collectionField.name, defaultCollapse],
);
const valueKey = _valueKey || collectionField?.targetKey || 'id';
const labelKey = _labelKey || fieldSchema['x-component-props']?.fieldNames?.label || valueKey;