Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Allow for updates to the sortable options #4

Merged
merged 1 commit into from
May 21, 2013

Conversation

robjames
Copy link
Contributor

I $observe the attrs for changes and update the options. This enables you to update the options on the fly.

Example being enabling and disabling the ability to sort, during an "edit" action.

I $observe the attrs for changes and update the options. This enables you to update the options on the fly. 

Example being enabling and disabling the ability to sort, during an "edit" action.

opts = angular.extend({}, uiSortableConfig, scope.$eval(attrs.uiSortable));
attrs.$observe('ui-sortable', function(){
opts = angular.extend({}, uiSortableConfig, scope.$eval(attrs.uiSortable));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed to simply:

angular.extend(opts, uiSortableConfig, scope.$eval(attrs.uiSortable));

ProLoser added a commit that referenced this pull request May 21, 2013
Allow for updates to the sortable options
@ProLoser ProLoser merged commit 5ba4eb7 into angular-ui:master May 21, 2013
thgreasi added a commit that referenced this pull request Nov 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants