Clone not working with a TabbedForm on the Create component
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Comienza con el repositorio de reproducción ra-tabbedform-clone, especialmente con CloneStateButton y el componente PostCreate que usa TabbedForm, y compara su comportamiento con la configuración más reciente de react-admin descrita en el issue. Reproduce el flujo de clonación editando el título, cambiando de General a Misc y volviendo, y verifica después que las ediciones se conserven al regresar a la primera pestaña.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What you were expecting:
When cloning a resource, a tabbed create form shows all the values from the original record (except the omitted id). And when changes the values in that create form, the changes are kept even when switching tabs.
What happened instead:
The create form looks ok, it shows the values of the cloned record. However when changing prefilled values on tab 1 and navigate to tab 2. When you go back to tab 1, the changes are gone.
Steps to reproduce:
- Go to posts resource
- Click on a post
- Click "Clone" button
- Fill in the "id" field (which is empty because omitted in the clone)
- Change the "title" (which was prefilled with value of cloned record)
- Switch to second tab "Misc" of the create form by clicking on that tab
- Go back to first tab "General" by clicking on that tab
- Note that "id" is still filled in
- Note that "title" changes are gone... it is back to it's original value of the cloned record. ==> bug
- Change the "title" again
- Switch to second tab and back to first tab again
- Note that this second time the "title" changes are still there
Related code:
- A link to a GitHub repo with the minimal codebase to reproduce the issue
See https://github.com/lvernaillen/ra-tabbedform-clone
- Started from the basic react-admin app via
npx [email protected] ra-tabbedform-clone - Added a
CloneStateButtonto clone via location.state instead of via search - Made a simple
PostEditcomponent - Made a simple
PostCreatecomponent that usesTabbedForm
Other information:
Only related issue I found is from the v3 version: https://github.com/marmelab/react-admin/issues/4066
Tried to reproduce this on latest react-admin v5.7.2 via npx create-react-admin@latest ra-tabbedform-latest --data-provider fakerest --resource posts. But there it seems to work.
Using the regular CloneButton this problem does not occur. However, that uses the location search and I do not want my complete record state in the URL. The docs state "In general, using the location state is a safe bet."
Environment
- React-admin version: 4.16.20
- Last version that did not exhibit the issue (if applicable):
- React version: 18.3.1
- Browser: Chrome Version 131.0.6778.265 (Official Build) (64-bit)
- Stack trace (in case of a JS error):
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 5.5k
- Merge medio
- 1 d 3 min
- PR fusionados (30 d)
- 32
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de marmelab/react-admin
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
marmelab/react-admin#11431 ·
Los mantenedores suelen responder en 1 día
-
Pagination: page button aria-labels are not translated on small screensPosiblemente ocupada @Singmin la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
marmelab/react-admin#11427 ·
Los mantenedores suelen responder en 1 día
-
Add emptyText property to SelectArrayInputPosiblemente ocupada @kwitykwity la tomó hace 59 días. Abiertoenhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
marmelab/react-admin#10454 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 Más de una semana Aptitud para principiantes 38/100
marmelab/react-admin#11426 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
ra-data-graphql-simple: outdated graphql-ast-types-browser dependency causes npm peer warningsQuizá libre de nuevo @bipul724 la tomó hace 13 días y no hay ningún pull request abierto. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
marmelab/react-admin#11395 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de marmelab/react-admin
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
CopilotKit/openmuse#215 ·
Los mantenedores suelen responder en 3 días
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
software-mansion/argent#1698 ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 comentario ·
Los mantenedores suelen responder en 1 día