ui-sortable icon indicating copy to clipboard operation
ui-sortable copied to clipboard

Adding ui and event arguments to attribute callback expressions

Open filipkis opened this issue 7 years ago • 3 comments

Currently if you specify an expression that's not just a reference to a function such as ui-sortable-update=doSomething() you have no way of accessing the event and ui arguments passed to callbacks.

With this PR I've made those two arguments available as $event and $ui parameters in the scope of the expression execution. So now you could do ui-sortable-update=doSomething($event, $ui) or even ui-sortable-update=doSomething($event, $ui.item.sortable).

filipkis avatar Oct 24 '18 14:10 filipkis

Coverage Status

Coverage remained the same at 100.0% when pulling 5adae58cd837033e59558ca1eb501d283ce3852a on filipkis:attribute-arguments into e763b5765eea87743c8463ddf045a53015193c20 on angular-ui:master.

coveralls avatar Oct 24 '18 14:10 coveralls

P.S. I've originally tried to submit this PR as #557, but had trouble with jshint (there's a post commit hook that messes up the quotes), that's why I created a new one to have a cleaner history.

filipkis avatar Oct 24 '18 14:10 filipkis

Any chance this gets merged into main branch. It's rather simple, but IMHO valuable addition, so it shouldn't be hard to review.

filipkis avatar Nov 15 '18 15:11 filipkis