DataGrid adopts another DataGrid's component structure after opening and closing the settings dialog

Open
#6,328 1 comment 0 reactions 1 assignee View on GitHub

@Victoriya25 is already working on this.

Since Jul 22, 2026.

Assessment

This issue has not been assessed yet.

Description

Bug description

When working with multiple DataGrid components in the Form Builder, opening the settings dialog of one DataGrid and closing it without saving can affect another DataGrid.

After opening the settings dialog of a second DataGrid and clicking Save (with or without making any changes), the second DataGrid unexpectedly adopts the internal component structure of the first DataGrid.

This results in the second DataGrid losing its original structure and becoming identical to the first one.


Version/Branch

Release: 5.2.2
Branch: main


Steps to reproduce

  1. Create a new form in the Form Builder.
  2. Add DataGrid A.
  3. Add any component inside DataGrid A (for example, a Text Field).
  4. Add DataGrid B.
  5. Leave DataGrid B empty or add different components.
  6. Open the settings dialog of either DataGrid.
  7. Close the dialog by clicking Cancel or by clicking outside the modal.
  8. Open the settings dialog of the other DataGrid.
  9. Click Save (the issue occurs whether or not any changes are made).
  10. Observe that the second DataGrid now contains the component structure of the first DataGrid.

Expected behavior

Each DataGrid should preserve its own component structure.

Opening and closing another DataGrid's settings dialog should not affect any other DataGrid, regardless of whether changes are made before saving.


Actual behavior

After saving the second DataGrid, its internal component structure is replaced with the structure of the first DataGrid whose settings dialog was previously opened.

This occurs even if no changes are made before clicking Save.


Screenshots / Evidence

The following evidence is attached:

  • GIF showing the complete reproduction.
Image

Additional context

  • The issue occurs when the first settings dialog is closed either by Cancel or by clicking outside the modal.
  • The issue also occurs whether the second DataGrid is saved with or without modifying any properties.
  • The problem appears to be related to the DataGrid configuration dialog reusing or copying the internal component structure from another DataGrid instance.
Dominant language
JavaScript
Stars
2.1k
Forks
1.1k
Avg merge
3d 8h
Merged PRs (30d)
1

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from formio/formio.js

All issues in formio/formio.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.