diff --git a/src/context/browserSteps.tsx b/src/context/browserSteps.tsx index b3ed2b0a..badf5e5c 100644 --- a/src/context/browserSteps.tsx +++ b/src/context/browserSteps.tsx @@ -102,6 +102,26 @@ export const BrowserStepsProvider: React.FC<{ children: React.ReactNode }> = ({ ); }; + const updateListTextFieldLabel = (listId: number, fieldKey: string, newLabel: string) => { + setBrowserSteps(prevSteps => + prevSteps.map(step => { + if (step.type === 'list' && step.id === listId) { + return { + ...step, + fields: { + ...step.fields, + [fieldKey]: { + ...step.fields[fieldKey], + label: newLabel + } + } + }; + } + return step; + }) + ); + }; + return (