Skip to content

Commit

Permalink
Merge pull request #23 from iainbeeston/patch-1
Browse files Browse the repository at this point in the history
Return response after update
  • Loading branch information
guillaumebriday committed Jun 16, 2023
2 parents 1d8d36b + 5640881 commit da12b58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Return the response object from `onUpdate`

## [4.1.0] - 2022-12-25

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class extends Controller {
const data = new FormData()
data.append(param, newIndex + 1)

await patch(item.dataset.sortableUpdateUrl, { body: data, responseKind: this.responseKindValue })
return await patch(item.dataset.sortableUpdateUrl, { body: data, responseKind: this.responseKindValue })
}

get options (): Sortable.Options {
Expand Down

0 comments on commit da12b58

Please sign in to comment.