voici le résultat
<div class="grid js-filter-content">
Bonjour je suis la formation filtrage en Ajax, mais je reçois une erreur
Ce que je veux
Avoir un rendu flip
Ce que j'obtiens
Uncaught runtime errors:
ERROR
this.content.children.forEach is not a function
flipContent@http://localhost:8080/build/app.js:439:29
_callee2$@http://localhost:8080/build/app.js:409:20
tryCatch@http://localhost:8080/build/app.js:275:1357
./assets/modules/Filter.js/_regeneratorRuntime/makeInvokeMethod/<@http://localhost:8080/build/app.js:275:4182
./assets/modules/Filter.js/_regeneratorRuntime/defineIteratorMethods/</<@http://localhost:8080/build/app.js:275:2208
asyncGeneratorStep@http://localhost:8080/build/app.js:276:103
_next@http://localhost:8080/build/app.js:277:212
promise callbackasyncGeneratorStep@http://localhost:8080/build/app.js:276:242
_next@http://localhost:8080/build/app.js:277:212
promise callbackasyncGeneratorStep@http://localhost:8080/build/app.js:276:242
_next@http://localhost:8080/build/app.js:277:212
./assets/modules/Filter.js/_asyncToGenerator/</<@http://localhost:8080/build/app.js:277:369
./assets/modules/Filter.js/_asyncToGenerator/<@http://localhost:8080/build/app.js:277:97
loadUrl@http://localhost:8080/build/app.js:424:25
_callee$@http://localhost:8080/build/app.js:371:53
tryCatch@http://localhost:8080/build/app.js:275:1357
./assets/modules/Filter.js/_regeneratorRuntime/makeInvokeMethod/<@http://localhost:8080/build/app.js:275:4182
./assets/modules/Filter.js/_regeneratorRuntime/defineIteratorMethods/</<@http://localhost:8080/build/app.js:275:2208
asyncGeneratorStep@http://localhost:8080/build/app.js:276:103
_next@http://localhost:8080/build/app.js:277:212
./assets/modules/Filter.js/_asyncToGenerator/</<@http://localhost:8080/build/app.js:277:369
./assets/modules/Filter.js/_asyncToGenerator/<@http://localhost:8080/build/app.js:277:97
loadForm@http://localhost:8080/build/app.js:379:26
EventListener.handleEvent*./assets/modules/Filter.js/bindEvents/<@http://localhost:8080/build/app.js:354:15
bindEvents@http://localhost:8080/build/app.js:353:58
Filter@http://localhost:8080/build/app.js:335:10
./assets/app.js@http://localhost:8080/build/app.js:178:1
webpack_require@http://localhost:8080/build/runtime.js:28:33
webpack_exec@http://localhost:8080/build/app.js:484:67
@http://localhost:8080/build/app.js:485:406
__webpack_require__.O@http://localhost:8080/build/runtime.js:72:23
@http://localhost:8080/build/app.js:486:56
webpackJsonpCallback@http://localhost:8080/build/runtime.js:1216:46
@http://localhost:8080/build/app.js:1:53
voici le résultat
<div class="grid js-filter-content">
Et que donne .children ?
Enfait, je récupère une collection, et c'est pour ça que je ne peux pas faire un forEach. Pourtant, j'ai suivi tout à la lettre
Oui c'est étrange car normalement tu peux tout à fait faire un forEach sur une collection. Au pire pour convertir une collection en tableau tu peux faire un Array.from(this.content.children).forEach()
HTMLCollection { 0: div#product-1.class.card, 1: div#product-2.class.card, 2: div#product-16.class.card, 3: div#product-17.class.card, 4: div#product-18.class.card, 5: div#product-19.class.card, 6: div#product-20.class.card, 7: div#product-6.class.card, 8: div#product-4.class.card, length: 9, … }
Vérifie la valeur de this.content avec un console.log pour comprendre pourquoi e n'est pas l'élément attendu.
J'ai déjà essayé mais ca ne passe pas, même avec Objet.entries ça plante
Bon ben je sais pas pourquoi, maintenant ça passe, merci
Je reviens vers Toi GraFikart: hier tout fonctionnait et aujourd'hui quand j'ai démarré le serveur:
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/, http://127.0.0.1:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Users\laure\PhpstormProjects\circleofflavors\public' directory
<i> [webpack-dev-server] 404s will fallback to '/index.html'
ERROR Failed to compile with 2 errors 16:55:15
error in ./node_modules/core-js/internals/is-constructor.js 16:55:15
Module parse failed: Unexpected character '' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
error in ./node_modules/core-js/internals/make-built-in.js 16:55:15
Module parse failed: Unexpected character '' (10:28)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
Entrypoint app [big] 1.37 MiB = runtime.js 106 KiB vendors-node_modules_symfony_stimulus-bridge_dist_index_js-node_modules_core-js_modules_es_ar-6bbff4.js 1.18 MiB app.css 382 bytes app.js 83.4 KiB
webpack compiled with 28 errors
voici ce que j'ai dans mon fichier make-built-in.js :