mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: style condition on subtable column fields not applied correctly (#7083)
* fix: style condition on subtable column fields not applied correctly * fix: bug
This commit is contained in:
parent
b3fb423d5e
commit
e030c4b680
@ -515,6 +515,7 @@ const InternalBodyCellComponent = (props) => {
|
||||
const displayNone = { display: 'none' };
|
||||
const BodyCellComponent = ({ columnHidden, ...props }) => {
|
||||
const { designable } = useDesignable();
|
||||
const collection = useCollection();
|
||||
|
||||
if (columnHidden) {
|
||||
return (
|
||||
@ -524,7 +525,11 @@ const BodyCellComponent = ({ columnHidden, ...props }) => {
|
||||
);
|
||||
}
|
||||
|
||||
return <InternalBodyCellComponent {...props} />;
|
||||
return (
|
||||
<SubFormProvider value={{ value: props?.record, collection, fieldSchema: props.schema }}>
|
||||
<InternalBodyCellComponent {...props} />{' '}
|
||||
</SubFormProvider>
|
||||
);
|
||||
};
|
||||
|
||||
interface TableProps {
|
||||
|
@ -34,7 +34,8 @@ export function useSatisfiedActionValues({
|
||||
const variables = useVariables();
|
||||
const localVariables = useLocalVariables({ currentForm: { values: formValues } as any });
|
||||
const localSchema = schema ?? fieldSchema;
|
||||
const styleRules = rules ?? localSchema[LinkageRuleDataKeyMap[category]];
|
||||
const styleRules =
|
||||
rules ?? (localSchema[LinkageRuleDataKeyMap[category]] || localSchema?.parent[LinkageRuleDataKeyMap[category]]);
|
||||
const app = useApp();
|
||||
|
||||
const compute = useCallback(() => {
|
||||
@ -65,7 +66,7 @@ export function useSatisfiedActionValues({
|
||||
form.removeEffects(id);
|
||||
};
|
||||
}
|
||||
}, [form, compute]);
|
||||
}, [form, compute, formValues]);
|
||||
|
||||
return { valueMap };
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user