Versent / redux-crud

A set of standard actions and reducers for Redux CRUD Applications
MIT License
624 stars 54 forks source link

Add test for partial updates #28

Closed bramdevries closed 8 years ago

bramdevries commented 8 years ago

This PR illustrates a problem when partially updating a record.

Current Behavior

When partially updating a record it replaces the original record.

Expected Behavior

When partially updating a record it should append to the original record.

bramdevries commented 8 years ago

@sporto was replacing the original record something you deliberately added, and if so what would be the reason? I'm assuming this is a bug since in the documentation you mention that it will merge while it currently replaces.

sporto commented 8 years ago

Hi, this is not a bug. This is the intended behaviour, maybe the documentation is not clear. Merge is referring to merging one record into the current collection, not to merging fields in a record.

Do you think merging attributes in a record is needed? If we want to have to add this in a different way, maybe by having an argument in the action.

sporto commented 8 years ago

Hi @bramdevries I will close this PR as this is the intended behaviour, please open an issue to discuss further improvements re merging records.