@massimo-cassandro/minimo 0.12.5 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -251,6 +251,22 @@ class SimpleDatatableAdapter extends HTMLElement {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
/**
|
|
255
|
+
* Distrugge l'istanza DataTable interna e svuota il componente.
|
|
256
|
+
* Equivale a datatable.destroy() di simple-datatables.
|
|
257
|
+
* Dopo la chiamata è possibile richiamare init() per reinizializzare
|
|
258
|
+
* la tabella con nuovi dati o colonne, senza ricreare l'elemento.
|
|
259
|
+
*/
|
|
260
|
+
destroy() {
|
|
261
|
+
if (this._dt) {
|
|
262
|
+
this._dt.destroy();
|
|
263
|
+
this._dt = null;
|
|
264
|
+
}
|
|
265
|
+
this._loadStarted = false;
|
|
266
|
+
this._loadGeneration++;
|
|
267
|
+
this.innerHTML = '';
|
|
268
|
+
}
|
|
269
|
+
|
|
254
270
|
/**
|
|
255
271
|
* Restituisce l'istanza DataTable interna di simple-datatables.
|
|
256
272
|
* Utile per operazioni non coperte dall'API del componente.
|