Skip to content

Commit 4673082

Browse files
committed
0.13.1
1 parent 7213981 commit 4673082

File tree

4 files changed

+50
-28
lines changed

4 files changed

+50
-28
lines changed

demo/build/app.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
3838
}
3939
config.$inject = ['$sceDelegateProvider', '$httpProvider', '$stateProvider', '$compileProvider', '$urlRouterProvider', 'demoMapProvider'];
4040

41-
app.constant('version', 'v0.13.0');
41+
app.constant('version', 'v0.13.1');
4242
app.config(config);
4343

4444
angular.element(document).ready(function() {
@@ -253,123 +253,123 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof requ
253253
module.exports = {
254254
'intro': {
255255
'simple-example': {
256-
url: getUrl('nudumu/4'),
256+
url: getUrl('nudumu/6'),
257257
title: 'Simple example',
258258
description: 'Simple example'
259259
},
260260
'full-featured-demo': {
261-
url: getUrl('xezevi/3'),
261+
url: getUrl('xezevi/4'),
262262
title: 'Full featured demo',
263263
description: 'Full featured demo'
264264
}
265265
},
266266
'configuration': {
267267
'configuration-by-object': {
268-
url: getUrl('getazu/3'),
268+
url: getUrl('getazu/4'),
269269
title: 'By `settings` object',
270270
description: 'Configuration by setting `settings` object'
271271
},
272272
'configuration-declarative-way': {
273-
url: getUrl('jupeme/3'),
273+
url: getUrl('jupeme/4'),
274274
title: 'In declarative way',
275275
description: 'Configuration in declarative way'
276276
}
277277
},
278278
'columns': {
279279
'add-remove-column-ng-repeat': {
280-
url: getUrl('muluto/4'),
280+
url: getUrl('muluto/5'),
281281
title: 'Add/Remove (ng-repeat)',
282282
description: 'Add/Remove columns using ng-repeat'
283283
},
284284
'add-remove-column-by-attr': {
285-
url: getUrl('xayeru/3'),
285+
url: getUrl('xayeru/4'),
286286
title: 'Add/Remove (`columns` attribute)',
287287
description: 'Add/Remove columns using `columns` attribute'
288288
}
289289
},
290290
'binding': {
291291
'data-binding': {
292-
url: getUrl('lupile/4'),
292+
url: getUrl('lupile/5'),
293293
title: 'Data binding',
294294
description: 'Data binding'
295295
},
296296
'settings-binding': {
297-
url: getUrl('xaqasi/3'),
297+
url: getUrl('xaqasi/4'),
298298
title: 'Table settings binding',
299299
description: 'Table settings binding'
300300
}
301301
},
302302
'callbacks': {
303303
'callbacks-by-object': {
304-
url: getUrl('nayito/5', 'html,js,console,output'),
304+
url: getUrl('nayito/7', 'html,js,console,output'),
305305
title: 'By `settings` object',
306306
description: 'Listening callbacks using `settings` object'
307307
},
308308
'callbacks-declarative-way': {
309-
url: getUrl('pucale/4', 'html,js,console,output'),
309+
url: getUrl('pucale/5', 'html,js,console,output'),
310310
title: 'In declarative way',
311311
description: 'Listening callbacks in declarative way'
312312
}
313313
},
314314
'plugins': {
315315
'copy-paste-context-menu': {
316-
url: getUrl('zohoge/2'),
316+
url: getUrl('zohoge/3'),
317317
title: 'Enable copy/paste in context menu',
318318
description: 'Enable copy/paste in context menu'
319319
}
320320
},
321321
'pagination': {
322322
'rows-pagination': {
323-
url: getUrl('fohohenabo/1'),
323+
url: getUrl('rorozo/1'),
324324
title: 'Paginate rows',
325325
description: 'Paginate rows'
326326
},
327327
'columns-pagination': {
328-
url: getUrl('qudufogafu/1'),
328+
url: getUrl('kolerig/1'),
329329
title: 'Paginate columns',
330330
description: 'Paginate columns'
331331
},
332332
},
333333
'other': {
334334
'access-to-instance': {
335-
url: getUrl('fovoxu/4'),
335+
url: getUrl('fovoxu/5'),
336336
title: 'Access to Handsontable instance',
337337
description: 'Access to Handsontable instance'
338338
},
339339
'custom-validator': {
340-
url: getUrl('qoweju/3'),
340+
url: getUrl('qoweju/4'),
341341
title: 'Custom validator',
342342
description: 'Custom validator'
343343
},
344344
'custom-renderer': {
345-
url: getUrl('locome/2'),
345+
url: getUrl('locome/3'),
346346
title: 'Custom renderer',
347347
description: 'Custom renderer'
348348
},
349349
},
350350
'PRO': {
351351
'collapsing-columns-with-nested-headers': {
352-
url: getUrl('wilani/3'),
352+
url: getUrl('wilani/4'),
353353
title: 'Collapsing columns with nested headers',
354354
description: 'Create a nested, hierarchical structure of headers with expandable and collapsible columns'
355355
},
356356
'filtering-simple': {
357-
url: getUrl('fijida/3'),
357+
url: getUrl('fijida/4'),
358358
title: 'Data filtering (simple example)',
359359
description: 'Display rows that meet your criteria and hide the rest'
360360
},
361361
'filtering-external-inputs': {
362-
url: getUrl('rewefa/9'),
362+
url: getUrl('rewefa/10'),
363363
title: 'Data filtering (external inputs)',
364364
description: 'Display rows that meet your criteria and hide the rest'
365365
},
366366
'hiding-columns': {
367-
url: getUrl('wapufa/2'),
367+
url: getUrl('wapufa/3'),
368368
title: 'Hiding columns',
369369
description: 'Hide specific columns and show the rest'
370370
},
371371
'hiding-rows': {
372-
url: getUrl('roximi/3'),
372+
url: getUrl('roximi/4'),
373373
title: 'Hiding rows',
374374
description: 'Hide specific rows and show the rest'
375375
},

dist/ngHandsontable.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* ng-handsontable 0.13.0
2+
* ng-handsontable 0.13.1
33
*
44
* Copyright 2012-2015 Marcin Warpechowski
55
* Copyright 2015 Handsoncode sp. z o.o. <hello@handsontable.com>
66
* Licensed under the MIT license.
77
* https://github.com/handsontable/ngHandsontable
8-
* Date: Wed Oct 26 2016 10:00:05 GMT+0200 (CEST)
8+
* Date: Thu Aug 20 2020 11:07:09 GMT+0200 (CEST)
99
*/
1010

1111
if (document.all && !document.addEventListener) { // IE 8 and lower
@@ -470,6 +470,10 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
470470
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
471471
};
472472
this.removeColumnSetting = function(column) {
473+
if (!$scope.hotInstance) {
474+
return;
475+
}
476+
473477
if ($scope.htSettings.columns.indexOf(column) > -1) {
474478
$scope.htSettings.columns.splice($scope.htSettings.columns.indexOf(column), 1);
475479
settingFactory.updateHandsontableSettings($scope.hotInstance, $scope.htSettings);
@@ -597,6 +601,24 @@ Handsontable.hooks.add('afterContextMenuShow', function() {
597601
settingFactory.updateHandsontableSettings(scope.hotInstance, scope.htSettings);
598602
}
599603
});
604+
605+
function destroyInstance() {
606+
if (scope.hotInstance) {
607+
scope.hotInstance.destroy();
608+
scope.hotInstance = null;
609+
scope.htSettings = {};
610+
}
611+
}
612+
613+
// Destroy triggered by controller or scope destroying
614+
scope.$on('$destroy', function() {
615+
destroyInstance();
616+
});
617+
618+
// Destroy triggered by DOM element removing
619+
element.on('$destroy', function() {
620+
destroyInstance();
621+
});
600622
};
601623
}
602624
};

0 commit comments

Comments
 (0)