@massimo-cassandro/minimo 0.11.7 → 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.7",
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",
@@ -384,20 +384,22 @@ class SimpleDatatableAdapter extends HTMLElement {
384
384
  .join(' ')
385
385
  : null;
386
386
 
387
-
388
- console.log('col:', col_item._heading, '| value:', value, '| sortValue:', sortValue, '| searchValue:', searchValue);
389
-
390
-
391
387
  // Se sono definiti _sortValue o _searchValue, restituisce un
392
388
  // oggetto cella strutturato; altrimenti il valore grezzo.
393
389
  // Se sono definiti _sortValue o _searchValue, restituisce un
394
390
  // oggetto cella strutturato con attributi data-order / data-search
395
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
396
398
  if (sortValue !== null || searchValue !== null) {
397
- const attrs = {};
398
- if (sortValue !== null) attrs['data-order'] = sortValue;
399
- if (searchValue !== null) attrs['data-search'] = searchValue;
400
- 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;
401
403
  }
402
404
 
403
405
  return value;