fix: association block filter params (#3039)
This commit is contained in:
parent
52c3f28c04
commit
3aca9e05d9
@ -97,6 +97,9 @@ const useResource = (props: UseResourceProps) => {
|
|||||||
if (record?.__parent?.[association?.sourceKey || 'id']) {
|
if (record?.__parent?.[association?.sourceKey || 'id']) {
|
||||||
return api.resource(resource, record.__parent[association?.sourceKey || 'id']);
|
return api.resource(resource, record.__parent[association?.sourceKey || 'id']);
|
||||||
}
|
}
|
||||||
|
if (record?.[association?.sourceKey || 'id']) {
|
||||||
|
return api.resource(resource, record[association?.sourceKey || 'id']);
|
||||||
|
}
|
||||||
return api.resource(collection);
|
return api.resource(collection);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user