Remove apiTriggerValue variable

This commit is contained in:
Miklos Marton 2026-05-25 22:14:01 +02:00
parent a55ab3fb1e
commit c852380ba3
1 changed files with 2 additions and 5 deletions

View File

@ -15,8 +15,7 @@ export default function NumberField({
placeholderWarningCompare,
placeholderWarning,
onChange,
selectAndFocus = false,
apiTriggerValue
selectAndFocus = false
}: Readonly<{
controller: UseControllerReturn<FieldValues, any>;
definition: any;
@ -26,7 +25,6 @@ export default function NumberField({
placeholderWarning?: string;
onChange: (value: any) => void;
selectAndFocus?: boolean;
apiTriggerValue?: any;
}>) {
const fieldId = useId();
const inputRef = useRef<HTMLInputElement | null>(null);
@ -68,7 +66,6 @@ export default function NumberField({
useEffect(() => {
if (!selectAndFocus) return;
if (apiTriggerValue === undefined) return;
if (!inputRef.current) return;
inputRef.current.focus();
@ -77,7 +74,7 @@ export default function NumberField({
if (!el) return;
el.setSelectionRange(0, el.value.length);
});
}, [apiTriggerValue, selectAndFocus]);
}, [selectAndFocus]);
const rightSection = useMemo(() => {
if (