mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 00:48:25 +00:00
Fixed value of value CSA when no default value is set and clear() action is used.
This commit is contained in:
parent
e44493c965
commit
74c88f3169
1 changed files with 7 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in a new issue