Skip to content

Commit

Permalink
Fix annotation library breaking after editing one item (#3204)
Browse files Browse the repository at this point in the history
SDESK-4801

If the item was not on page 1, updating the item would cause pagination
to go back to page 1 and that was making the component not find the
open item inside the current fetched data (cause it was looking on page
1 instead of page X)
  • Loading branch information
pablopunk authored and petrjasek committed Nov 13, 2019
1 parent ce74c12 commit 174ea4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/core/helpers/CrudManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function connectCrudManager<Props, PropsToConnect, Entity extends IBaseRe
}

refresh(): Promise<IRestApiResponse<Entity>> {
return this.read(1, this.state.activeSortOption, this.state.activeFilters);
return this.read(this.state._meta.page, this.state.activeSortOption, this.state.activeFilters);
}

sort(sortOption: ISortOption): Promise<IRestApiResponse<Entity>> {
Expand Down

0 comments on commit 174ea4f

Please sign in to comment.