fix: association block not rendering in popup within collection inher… (#6303)

* fix: association block not rendering in popup within collection inheritance

* fix: bug

* Merge main into F-1713
This commit is contained in:
Katherine 2025-03-04 16:48:09 +08:00 committed by GitHub
parent 2f7b7315ca
commit 2cfe4d7af7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,14 +103,14 @@ const useCompatDetailsBlockParams = (props) => {
export const DetailsBlockProvider = withDynamicSchemaProps((props) => {
const { params, parseVariableLoading } = useCompatDetailsBlockParams(props);
const record = useCollectionRecordData();
const { association, dataSource } = props;
const { association, dataSource, action } = props;
const { getCollection } = useCollectionManager_deprecated(dataSource);
const { __collection } = record || {};
const { designable } = useDesignable();
const collection = props.collection || getCollection(association, dataSource).name;
const collectionName = props.collection;
let detailFlag = true;
if (!designable && __collection) {
detailFlag = __collection === collection;
if (!designable && __collection && action === 'get' && !association) {
detailFlag = __collection === collectionName;
}
const refresh = useUpdate();