fixed errors
This commit is contained in:
parent
1ec2a3ff7a
commit
15cb712c3d
2 changed files with 10 additions and 11 deletions
|
@ -137,8 +137,7 @@ export const FormBuilder = observer((props: IFormBuilder) => {
|
|||
return (
|
||||
<div>
|
||||
<CoreInput
|
||||
isFormBuilder={true}
|
||||
|
||||
isFormBuilder={true}
|
||||
validation={element.type.isEqual(InputType.NUMBER) ? (el) => Number().isValid(el) : undefined}
|
||||
onChange={(e) => {
|
||||
store.changeTotalValue(element.id, e);
|
||||
|
|
|
@ -29,15 +29,15 @@ export const CoreInput = (props: IInputProps) => {
|
|||
setAppendInnerText(false);
|
||||
}
|
||||
}, [ref, value, isAppendInnerText, setAppendInnerText, props]);
|
||||
React.useEffect(() => {
|
||||
if (props.isFormBuilder === undefined) {
|
||||
if (ref.current && props.value) {
|
||||
ref.current.innerText = value;
|
||||
setValue(props.value);
|
||||
console.log(props.value);
|
||||
}
|
||||
}
|
||||
}, [props.value]);
|
||||
// React.useEffect(() => {
|
||||
// if (props.isFormBuilder) {
|
||||
// if (ref.current && props.value) {
|
||||
// ref.current.innerText = value;
|
||||
// setValue(props.value);
|
||||
// console.log(props.value);
|
||||
// }
|
||||
// }
|
||||
// }, [props.value]);
|
||||
|
||||
const isSmall = props.type !== undefined && props.type.isEqual(CoreInputType.small);
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue