loadItems
andonBeforeRequest
can be defined in props of component.- Added
getStateFromProps
andshouldRecountState
. It can be used for integration withreact-router
.
- Added
redux@^4.0.0
to peerDependencies.
- Migrate async flow from Promise to async/await.
- Do not catch errors in
loadItems
. - Removed
catchRejects
.
- For set error state you should use
LoadListError
.
// old
return Promise.reject({
error: 'Error',
additional: null,
});
// new
throw new LoadListError({
error: 'Error',
additional: null,
});
- Added
autoload
param to decorator for ability to prevent requesting items on component render.
- Don't throw error if list with specified id is alreade registered on page for prevent ssr errors.
- Added
resetSorting
prop to decorated component for reset sorting. - Added
saveFiltersOnResetAll
param to decorator for show previous list items while load request is pending.
- Added
insertItem
prop to decorated component for inserting items to list state.
- Allow set initial value of
additional
by param of decorator or prop of decorated component.
- Added
deleteItem
prop to decorated component for deleting items from list state. - Added
updateItem
prop to decorated component for updating items in list state.
- Now
filterlistPropTypes
are configurable. You can validate list items, additional data, errors and filters most strictly. - Added
filterlistProps
for most comfortable unit testing. - Added
react@^16.0.0
to peerDependencies.
- New
filterlistPropTypes
is incompatible with oldfilterlistPropTypes
. For fast migration you can replace allfilterlistPropTypes
in your code tofilterlistPropTypes({})
.