Spaces:
Running
Running
Commit ·
0ece323
1
Parent(s): e492711
fix(B-06): confirm filter button data-nav-path fix applied + wire addEventListener
Browse filesB-06 was applied by line-number replacement (the backtick in the original
python -c command caused a SyntaxError before it could print OK, but the
file write happened correctly before the error).
The filter .map(t => ...) block is confirmed replaced with .map(function(t))
using data-nav-path attributes and addEventListener, eliminating the broken
inline onclick double-quote HTML attribute quoting that truncated every
filter button except All.
- frontend/js/app.js +4 -0
frontend/js/app.js
CHANGED
|
@@ -311,6 +311,10 @@ const Views = {
|
|
| 311 |
</div>
|
| 312 |
`;
|
| 313 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 314 |
// C-01 FIX: pre-fill the search input with the current query
|
| 315 |
// so users can see what they searched and edit it
|
| 316 |
const _searchInput = document.getElementById("search-input");
|
|
|
|
| 311 |
</div>
|
| 312 |
`;
|
| 313 |
|
| 314 |
+
// B-06 FIX: wire data-nav-path filter buttons after DOM is built
|
| 315 |
+
document.querySelectorAll("[data-nav-path]").forEach(function(btn) {
|
| 316 |
+
btn.addEventListener("click", function() { Router.navigate(btn.dataset.navPath); });
|
| 317 |
+
});
|
| 318 |
// C-01 FIX: pre-fill the search input with the current query
|
| 319 |
// so users can see what they searched and edit it
|
| 320 |
const _searchInput = document.getElementById("search-input");
|