mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:47:20 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
7f258ac62b
@ -1266,18 +1266,20 @@ export const useAssociationFilterBlockProps = () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// 由于 选项字段不需要触发当前请求,所以当前请求更改为手动触发
|
// 由于选项字段不需要触发当前请求,所以当前请求更改为手动触发
|
||||||
manual: true,
|
manual: true,
|
||||||
debounceWait: 300,
|
debounceWait: 300,
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 由于 选项字段不需要触发当前请求,所以请求单独在 关系字段的时候触发
|
// 由于选项字段不需要触发当前请求,所以请求单独在关系字段的时候触发
|
||||||
if (!isOptionalField(collectionField)) {
|
if (!isOptionalField(collectionField)) {
|
||||||
run();
|
run();
|
||||||
}
|
}
|
||||||
}, [collectionField, labelKey, run, valueKey]);
|
|
||||||
|
// do not format the dependencies
|
||||||
|
}, [collectionField, labelKey, run, valueKey, field.componentProps?.params, field.componentProps?.params?.sort]);
|
||||||
|
|
||||||
if (!collectionField) {
|
if (!collectionField) {
|
||||||
return {};
|
return {};
|
||||||
|
@ -48,7 +48,7 @@ export const AssociationFilterItem = withDynamicSchemaProps(
|
|||||||
|
|
||||||
const defaultActiveKeyCollapse = useMemo<React.Key[]>(
|
const defaultActiveKeyCollapse = useMemo<React.Key[]>(
|
||||||
() => (defaultCollapse && collectionField?.name ? [collectionField.name] : []),
|
() => (defaultCollapse && collectionField?.name ? [collectionField.name] : []),
|
||||||
[],
|
[collectionField.name, defaultCollapse],
|
||||||
);
|
);
|
||||||
const valueKey = _valueKey || collectionField?.targetKey || 'id';
|
const valueKey = _valueKey || collectionField?.targetKey || 'id';
|
||||||
const labelKey = _labelKey || fieldSchema['x-component-props']?.fieldNames?.label || valueKey;
|
const labelKey = _labelKey || fieldSchema['x-component-props']?.fieldNames?.label || valueKey;
|
||||||
|
Loading…
Reference in New Issue
Block a user