diff --git a/frontend/src/components/NumberComponent.tsx b/frontend/src/components/NumberComponent.tsx index fefc02c..cc269f5 100644 --- a/frontend/src/components/NumberComponent.tsx +++ b/frontend/src/components/NumberComponent.tsx @@ -328,9 +328,7 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => { useEffect(() => { // Set the cursor position after the component re-renders - const inputElement = document.getElementsByName( - fullAccessPath - )[0] as HTMLInputElement; + const inputElement = document.getElementsByName(id)[0] as HTMLInputElement; if (inputElement && cursorPosition !== null) { inputElement.setSelectionRange(cursorPosition, cursorPosition); } @@ -353,7 +351,7 @@ export const NumberComponent = React.memo((props: NumberComponentProps) => { value={inputString} disabled={readOnly} onChange={() => {}} - name={fullAccessPath} + name={id} onKeyDown={handleKeyDown} onBlur={handleBlur} className={isInstantUpdate && !readOnly ? 'instantUpdate' : ''} diff --git a/frontend/src/components/StringComponent.tsx b/frontend/src/components/StringComponent.tsx index 1d985a5..654f604 100644 --- a/frontend/src/components/StringComponent.tsx +++ b/frontend/src/components/StringComponent.tsx @@ -90,7 +90,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {