You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57
``
**Current behavior**
If you are using the row expansion feature, and saving the expanded row data in the state (as demonstrated here https://www.primefaces.org/primereact/#/datatable/rowexpand), all of the expanded rows will collapse if any of the records' fields are changed when passing them in from Redux.
It seems like the table loses track of the mapping between the expanded row data and the modified record data being passed in as a prop to 'values'.
**Expected behavior**
Expanded rows should not collapse when the records passed in to the table are not new, just one or more fields modified.
**Minimal reproduction of the problem with instructions**
1) Setup Prime React DataTable with expander column. Records should be provided from redux state slice.
2) expand row
3) have a button in the expanded row update a field on one of the records through a redux action/reducer.
4) You'll notice the row collapses, despite the expandedRowData still being present.
https://codesandbox.io/s/m752k9jq8y
**Please tell us about your environment:**
Windows/IntelliJ/Tomcat
* **React version:**
16.8.3
* **PrimeReact version:**
2.0.1
* **Browser:**
ALL
* **Language:**
ES6/7
The text was updated successfully, but these errors were encountered:
This is expected, we need to keep a key of the records that does not change to uniquely identify it so that if a property changes it is still displayed as expanded.
cagataycivici
changed the title
DataTable expanded rows collapse when modifying one property of a record (using Redux)
DataTable expanded rows collapse when modifying one property of a record
May 30, 2019
I'm submitting a ...
The text was updated successfully, but these errors were encountered: