mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-09 23:49:27 +08:00
fix: onchange bug
This commit is contained in:
parent
2cf4040eea
commit
94ff4e9c28
@ -82,12 +82,9 @@ const Configurator = observer(
|
|||||||
const outputValue = helpersObs.value.slice(0, index + 1).reduce((value, helper) => {
|
const outputValue = helpersObs.value.slice(0, index + 1).reduce((value, helper) => {
|
||||||
return helper.handler(value, ...helper.args);
|
return helper.handler(value, ...helper.args);
|
||||||
}, value);
|
}, value);
|
||||||
const onFormValuesChange = useCallback(
|
const onChange = useCallback((values) => {
|
||||||
(values) => {
|
rawHelper.argsMap = values;
|
||||||
rawHelper.argsMap = values;
|
}, []);
|
||||||
},
|
|
||||||
[rawHelper],
|
|
||||||
);
|
|
||||||
const InputValue = () => {
|
const InputValue = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -173,7 +170,7 @@ const Configurator = observer(
|
|||||||
<>
|
<>
|
||||||
<InputValue />
|
<InputValue />
|
||||||
{HelperComponent ? (
|
{HelperComponent ? (
|
||||||
<HelperComponent value={helper.argsMap} onChange={onFormValuesChange} inputValue={inputValue} />
|
<HelperComponent value={helper.argsMap} onChange={onChange} inputValue={inputValue} />
|
||||||
) : (
|
) : (
|
||||||
<SchemaComponent
|
<SchemaComponent
|
||||||
schema={schema}
|
schema={schema}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user