Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-sortablejs

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-sortablejs - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

2

package.json
{
"name": "angular-sortablejs",
"version": "1.1.0",
"version": "1.2.0",
"description": "SortableJS for Angular 2+",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -112,2 +112,7 @@ # angular-sortablejs

### Updating the options
You can pass a new options object at anytime via the `[sortablejsOptions]` binding and the Angular's change detection will check for the changes from the previous options and will call the low level option setter from [Sortable.js](https://github.com/RubaXa/Sortable) to set the new option values.
> Note: It will only detect changes when a brand new options object is passed, not deep changes.
### Drag & drop between two lists

@@ -114,0 +119,0 @@

@@ -40,2 +40,16 @@ "use strict";

};
SortablejsDirective.prototype.ngOnChanges = function (changes) {
var _this = this;
var optionsChange = changes['_options'];
if (optionsChange && !optionsChange.isFirstChange()) {
var previousOptions_1 = optionsChange.previousValue;
var currentOptions_1 = optionsChange.currentValue;
Object.keys(currentOptions_1).forEach(function (optionName) {
if (currentOptions_1[optionName] !== previousOptions_1[optionName]) {
// use low-level option setter
_this._sortable.option(optionName, currentOptions_1[optionName]);
}
});
}
};
SortablejsDirective.prototype.ngOnDestroy = function () {

@@ -42,0 +56,0 @@ this._sortable.destroy();

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc