Skip to content

Commit aa787b3

Browse files
committed
Refresh table after removing entities
1 parent a1e9245 commit aa787b3

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/js/main.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,17 @@
179179

180180
button = new StyledElements.StyledButton({'class': 'btn-danger', 'iconClass': 'icon-trash', 'title': 'Delete'});
181181
button.addEventListener("click", function () {
182-
this.ngsi_connection.deleteAttributes([{'entity': {id: entry.id, type: entry.type}}]);
182+
this.ngsi_connection.deleteAttributes(
183+
[
184+
{'entity': {id: entry.id, type: entry.type}}
185+
],
186+
{
187+
onSuccess: this.ngsi_source.refresh.bind(this.ngsi_source),
188+
onFailure: function (error) {
189+
MashupPlatform.widget.log(error);
190+
}
191+
}
192+
);
183193
}.bind(this));
184194
content.appendChild(button);
185195

0 commit comments

Comments
 (0)