1rosehip / 1rosehip/jplist

Not Able to use collectionReadyEvent

Ouverte
#267 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
HTML
Étoiles
435
Forks
168
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I am trying to use the **collectionReadyEvent** ready event. But its not working.
However the other event seems to be.
This is the code i am using
` var $demo = $('#demo');
$demo.jplist({
itemsBox: '.list',
itemPath: '.list-item',
panelPath: '.jplist-panel',
animateToTopDuration: 1000,
effect: 'fade', });
var api = $demo.data('jplist');
var events = api.observer.events;

api.observer.on(events.collectionReadyEvent, function () {
console.log("collectionReadyEvent");
});
api.observer.on(events.unknownStatusesChanged, function ( {
console.log("unknownStatusesChanged");
});`

When i run this code the **unknownStatusesChanged** trigger callback seems to be run but **collectionReadyEvent** trigger callback is never fired.

I think the reason is the init function has been already fired. So i need to attach the **collectionReadyEvent** before initializing the **jplist**. But i am not sure i that can be achieved as we need the **observer.events** that can not be get after the jplist has been initialized.

So just wanted to know is there a way that i can use the **collectionReadyEvent** trigger.

Also is there a trigger before any filtering,sorting is applied like **redrawCallback** but that is called after the processing is done.

Simillarly is there a trigger before the filtering,sorting starts.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Examinez le code source de jplist pour comprendre le système d'observateurs et d'événements. Vérifiez où collectionReadyEvent est déclenché et pourquoi il pourrait ne pas se déclencher après l'initialisation. Examinez la séquence d'initialisation et voyez si les événements peuvent être attachés plus tôt. Testez avec un exemple minimal pour reproduire le problème.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript, jquery
Domaine
frontend
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.