@amsom-habitat/amsom-table 4.3.13 → 4.4.0
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/README.md +34 -1
- package/dist/amsom-table.js +3767 -3741
- package/dist/amsom-table.umd.cjs +19 -19
- package/dist/style.css +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -8,7 +8,40 @@ Il regroupe les packages :
|
|
|
8
8
|
|
|
9
9
|
## Nouvelles fonctionnalités
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Custom Search (v4.4.x)
|
|
12
|
+
|
|
13
|
+
Le composant `AmsomTableDraggable` supporte maintenant les fonctions de recherche personnalisées par colonne :
|
|
14
|
+
|
|
15
|
+
- **Recherche flexible** : Définissez votre propre logique de filtrage par colonne
|
|
16
|
+
- **Cas d'usage** : Filtrer par libellé quand la colonne affiche un ID
|
|
17
|
+
- **Compatible avec recherche standard** : Le customSearch complète la recherche par défaut
|
|
18
|
+
|
|
19
|
+
```vue
|
|
20
|
+
<amsom-table-draggable
|
|
21
|
+
:default-columns="columns"
|
|
22
|
+
:td-items-list="data"
|
|
23
|
+
:search="searchTerm"
|
|
24
|
+
>
|
|
25
|
+
<!-- vos templates -->
|
|
26
|
+
</amsom-table-draggable>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Exemple de configuration :**
|
|
30
|
+
```javascript
|
|
31
|
+
const columns = [
|
|
32
|
+
{
|
|
33
|
+
id: 'userId',
|
|
34
|
+
libelle: 'Utilisateur',
|
|
35
|
+
show: true,
|
|
36
|
+
customSearch: (item, searchTerm) => {
|
|
37
|
+
// Filtrer par le libellé de l'utilisateur au lieu de l'ID
|
|
38
|
+
return normalize(item.userLibelle).includes(normalize(searchTerm))
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Menu contextuel (v4.3.x)
|
|
12
45
|
|
|
13
46
|
Le composant `AmsomTableDraggable` supporte maintenant les menus contextuels :
|
|
14
47
|
|