@massimo-cassandro/minimo 0.11.6 → 0.11.8
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
|
@@ -389,11 +389,17 @@ class SimpleDatatableAdapter extends HTMLElement {
|
|
|
389
389
|
// Se sono definiti _sortValue o _searchValue, restituisce un
|
|
390
390
|
// oggetto cella strutturato con attributi data-order / data-search
|
|
391
391
|
// che simple-datatables può leggere in modo affidabile.
|
|
392
|
+
// Se sono definiti _sortValue o _searchValue, restituisce un
|
|
393
|
+
// oggetto cellType strutturato secondo le API di simple-datatables:
|
|
394
|
+
// { data, order?, attributes? }
|
|
395
|
+
// - `data` → contenuto visualizzato (obbligatorio)
|
|
396
|
+
// - `order` → valore alternativo per l'ordinamento (campo nativo)
|
|
397
|
+
// - `attributes['data-search']` → valore per searchMethod
|
|
392
398
|
if (sortValue !== null || searchValue !== null) {
|
|
393
|
-
const
|
|
394
|
-
if (sortValue !== null)
|
|
395
|
-
if (searchValue !== null)
|
|
396
|
-
return
|
|
399
|
+
const cellObj = { data: value ?? '' };
|
|
400
|
+
if (sortValue !== null) cellObj.order = sortValue;
|
|
401
|
+
if (searchValue !== null) cellObj.attributes = { 'data-search': searchValue };
|
|
402
|
+
return cellObj;
|
|
397
403
|
}
|
|
398
404
|
|
|
399
405
|
return value;
|