Skip to content

Commit

Permalink
fix(plugin): only check override if we can move row in first place (#613
Browse files Browse the repository at this point in the history
)

- since `canMove` is a private property, we should make sure it's `true` before trying to execute the override, this problem was caught in our implementation because we do use the plugin with the usability override
  • Loading branch information
ghiscoding authored Jun 5, 2021
1 parent 22571c3 commit 2ffccc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/slick.rowmovemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}

// if there's a UsabilityOverride defined, we also need to verify that the condition is valid
if (_usabilityOverride) {
if (_usabilityOverride && dd.canMove) {
var insertBeforeDataContext = _grid.getDataItem(insertBefore);
dd.canMove = checkUsabilityOverride(insertBefore, insertBeforeDataContext, _grid);
}
Expand Down

0 comments on commit 2ffccc6

Please sign in to comment.