Bonsoir,
j'ai créer un table avec pagination avec list.js
https://listjs.com/
probleme j'ai 17000 lignes a afficher donc le chargement est tres lourd.
Quelqu'un aurait une solution ?
Dans les fontions j'ai rien trouvé.
MERCI.
Bonsoir,
j'ai créer un table avec pagination avec list.js
https://listjs.com/
probleme j'ai 17000 lignes a afficher donc le chargement est tres lourd.
Quelqu'un aurait une solution ?
Dans les fontions j'ai rien trouvé.
MERCI.
17000 lignes, manifestement il faut laisser tomber toutes les options avec une chargement total en une seule fois ... paginer mais en ajax avec uen source en server side.
J'avais testé un script pour des grands tableaux
https://www.developpez.net/forums/d4...us-rapidement/
Ma page Developpez - Mon Blog Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag![]()
Venez sur le Chat de Développez !
Excuse moi peut tu m’expliquer car je ne peux pas abandonneer list.js tout les filtres et pagination sont faites.en cherchant j’ai Vu qu’il fallait utiliser la method indexasynchrone et callback mais aucun exemple concret ?
voici mon initiation actuelle :
Voici mon html :
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 <table class="table-list" data-currentpage="1" style="height:min-height:268px;> <thead> <th><button type="button" class="sort" data-sort="SearchId">Id<i class="caret"></i></button></th> <th><button type="button" class="sort" data-sort="SearchDate">CodeInsee<i class="caret"></i></button></th> <th><button type="button" class="sort" data-sort="SearchNomService">Nom<i class="caret"></i></button></th> <th><button type="button" class="sort" data-sort="SearchAdresse">Adresse<i class="caret"></i></button></th> <th><button type="button" class="sort" data-sort="SearchCp">Cp<i class="caret"></i></button></th> <th><button type="button" class="sort" data-sort="SearchVille">Ville<i class="caret"></i></button></th> <th><button type="button" class="sort">Téléphone<i class="caret"></i></button></th> <th><button type="button" class="sort">Email<i class="caret"></i></button></th> </thead> <tbody class="list">'; foreach($listeService as $service){ echo '<tr> <td class="SearchId">'.$service->getIdServicePublic().'</td> <td class="SearchDate">'.$service->getCodeInsee().'</td> <td class="SearchNomService">'.$service->getNomServicePublic().'</td> <td class="SearchAdresse">'.$service->getAdresse().'</td> <td class="SearchCp">'.$service->getCodePostal().'</td> <td class="SearchVille">'.$service->getCommune().'</td> <td>'.$service->getTelephone().' '.$service->getFax().'</td> <td>'.$service->getEmail().'</td>'; echo '</tr>'; } echo' </tbody> </table> <table class="table-footer"> <tr> <td class="table-pagination"> <button type="button" class="jPaginateBack"><i class="material-icons keyboard_arrow_left"></i></button> <ul class="pagination"></ul> <button type="button" class="jPaginateNext"><i class="material-icons keyboard_arrow_right"></i></button> </td> <td></td> </tr> <tr> <td class="table-search"> <input data-search-type="SearchId" class="search" placeholder="Search ID" /> </td> <td> <input data-search-type="SearchNom" class="search" placeholder="Search Nom" /> </td> <td> <input data-search-type="SearchIp" class="search" placeholder="Search IP" /> </td> <td> <button class="btn btn-danger" onclick="resetList();">Clear</button> </td> </tR> </table>
et le js de list.js :
merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 var searchInputs = document.querySelectorAll('input'); var options = { valueNames: ['SearchId','SearchNom','SearchAdresse','SearchCp','SearchVille'], page: 300, pagination: { innerWindow: 15, left: 14, right: 1, paginationClass: "pagination", } }; var userList = new List('tableID', options)
Je persiste à penser que list.js n'est pas adapté pour ton besoin avec 17000 lignes.
Je ne vois nulle part dans la doc de list js une fonctionnalité ajax avec une source coté serveur.
Je te réorienterai plutôt vers DataTable
Ma page Developpez - Mon Blog Developpez
Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
Votre post est résolu ? Alors n'oubliez pas le Tag![]()
Venez sur le Chat de Développez !
Partager