mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 01:49:13 +01:00
Fix model deletion
This commit is contained in:
@@ -174,15 +174,12 @@ const BaseInput = forwardRef<EditorView, InputProps>(function InputBase(
|
||||
);
|
||||
|
||||
const isValid = useMemo(() => {
|
||||
console.log('CHECKING VALIDITY', validate);
|
||||
if (required && !validateRequire(defaultValue ?? '')) return false;
|
||||
if (typeof validate === 'boolean') return validate;
|
||||
if (typeof validate === 'function' && !validate(defaultValue ?? '')) return false;
|
||||
return true;
|
||||
}, [required, defaultValue, validate]);
|
||||
|
||||
console.log('IS VALID', isValid, defaultValue);
|
||||
|
||||
const handleChange = useCallback(
|
||||
(value: string) => {
|
||||
onChange?.(value);
|
||||
|
||||
Reference in New Issue
Block a user