Fixed value of value CSA when no default value is set and clear() action is used.

This commit is contained in:
devanshu052000 2025-03-11 18:30:35 +05:30
parent e44493c965
commit 74c88f3169

View file

@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import { BaseInput } from './BaseComponents/BaseInput';
import { useInput } from './BaseComponents/hooks/useInput';
import SolidIcon from '@/_ui/Icon/SolidIcons';
@ -145,6 +145,12 @@ export const NumberInput = (props) => {
</div>
);
useEffect(() => {
if (isNaN(inputLogic.value) || inputLogic.value === '') {
props.setExposedVariable('value', null);
}
}, [inputLogic.value]);
return (
<BaseInput
{...props}