Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1adc38e

Browse files
committed
knockout sample: handle items removal
1 parent fb9d5a1 commit 1adc38e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ ko.components.register('dashboard-grid', {
4747
}
4848

4949
grid.add_widget(item);
50+
ko.utils.domNodeDisposal.addDisposeCallback(item[0], function () {
51+
grid.remove_widget(item);
52+
});
5053
}, this);
5154
};
5255

0 commit comments

Comments
 (0)