Fix an issue where inserting more than 10 rows does not work correctly in View Data; only parts end up in the table. #6582

This commit is contained in:
Khushboo Vashi 2023-07-24 12:49:42 +05:30
parent a5cb9b5679
commit a7f06eea0b
2 changed files with 2 additions and 1 deletions

View File

@ -56,3 +56,4 @@ Bug fixes
| `Issue #6544 <https://github.com/pgadmin-org/pgadmin4/issues/6544>`_ - Fix an issue where adding a sub-folder inside a folder is not working as expected in File Manager.
| `Issue #6556 <https://github.com/pgadmin-org/pgadmin4/issues/6556>`_ - Fix an error 'list' object has no attribute 'strip' while attempting to populate auto-complete manually the first time.
| `Issue #6558 <https://github.com/pgadmin-org/pgadmin4/issues/6558>`_ - Fixed an issue where ERD Tool can't load the saved pgerd file from Shared Storage.
| `Issue #6582 <https://github.com/pgadmin-org/pgadmin4/issues/6582>`_ - Fix an issue where inserting more than 10 rows does not work correctly in View Data; only parts end up in the table.

View File

@ -702,7 +702,7 @@ function dataChangeReducer(state, action) {
action.remove = action.remove || [];
dataChange.added = _.pickBy(dataChange.added, (_v, k)=>(action.remove.indexOf(k) == -1));
dataChange.added_index = _.pickBy(dataChange.added_index, (v)=>(action.remove.indexOf(v) == -1));
count = _.max(Object.keys(dataChange.added_index))||0;
count = _.max(Object.keys(dataChange.added_index).map(k=>+k))||0;
Object.keys(action.add).forEach((k)=>{
dataChange.added_index[++count] = k;
});