Commit d98d3dd
committed
fix(ui): scope data-search-count lookup to the filter widget
v2-search-filter resolved `list` relative to `[data-search-scope]`
but then picked `count` via a global `document.querySelector`. That
works on current pages (one widget per page) but is a footgun: the
moment a second filter widget ships on any page (e.g. sidebar facet
plus top-of-list), both filters would end up driving the same count
element. Applying the same scope/document fallback pattern we
already use for `list` — scope first, document fallback for legacy
single-widget layouts that put count outside the scope. Per review
on PR #571.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>1 parent edf6ccb commit d98d3dd
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| |||
0 commit comments