mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
refactor(form): optimize useDataFormItemProps hook (#5484)
This commit is contained in:
parent
48f1827f94
commit
f7a368f802
@ -8,9 +8,10 @@
|
||||
*/
|
||||
|
||||
import { useForm } from '@formily/react';
|
||||
import { useCollectionRecordData } from '../../../../../data-source/collection-record/CollectionRecordProvider';
|
||||
import { useSatisfiedActionValues } from '../../../../../schema-settings/LinkageRules/useActionValues';
|
||||
export function useDataFormItemProps() {
|
||||
const form = useForm();
|
||||
const { valueMap: style } = useSatisfiedActionValues({ category: 'style', formValues: form?.values });
|
||||
const data = useCollectionRecordData();
|
||||
const { valueMap: style } = useSatisfiedActionValues({ category: 'style', formValues: data });
|
||||
return { wrapperStyle: style };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user