@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massimo-cassandro/minimo",
3
- "version": "0.11.6",
3
+ "version": "0.11.8",
4
4
  "description": "Light css framework & utilities",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/massimo-cassandro/minimo#readme",
@@ -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 attrs = {};
394
- if (sortValue !== null) attrs['data-order'] = sortValue;
395
- if (searchValue !== null) attrs['data-search'] = searchValue;
396
- return { text: value ?? '', attributes: attrs };
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;