stockpile-co / api

The API for Stockpile, an app that manages stuff for organizations.
0 stars 1 forks source link

Send sortIndex with create and update response #374

Closed emroussel closed 6 years ago

emroussel commented 6 years ago

When a user creates or updates any entity on the app (item, kit, custom field, etc.), they get out of order, because the entity in the store is replaced by the one sent back from the api.

Ideally, the api would send the corresponding sortIndex so that entities keep their order.

AdamVig commented 6 years ago

Returning a sortIndex for only the updated or created item would not work, because it’s likely that the sortIndexes of the whole list change any time there is an update. Closing in favor of app/#437.