mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix GridFieldComponent not rendering all records
This commit is contained in:
parent
b2e8fd96ec
commit
2f7a7c3a5c
@ -29,7 +29,7 @@ function recordsReducer(state = initialState, action) {
|
||||
recordType = action.payload.recordType;
|
||||
// TODO Automatic pluralisation from recordType
|
||||
records = action.payload.data._embedded[`${recordType}s`] || {};
|
||||
records = records.reduce((prev, val) => Object.assign({}, prev, { [val.id]: val }), {});
|
||||
records = records.reduce((prev, val) => Object.assign({}, prev, { [val.ID]: val }), {});
|
||||
return deepFreeze(Object.assign({}, state, {
|
||||
[recordType]: records,
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user