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

@@ -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;
});