Component specific filter key
1 unresolved thread
1 unresolved thread
Closes #3511942
Merge request reports
Activity
200 208 > 201 209 {#each Object.entries(choices) as [id, label]} 202 210 <div class="pb-filter__checkbox__container"> 203 <label for={id}> 211 <label for={`${id}-${componentId}`}> 204 212 <input 205 213 type="checkbox" 206 {id} 214 id={`${id}-${componentId}`} - Comment on lines -206 to +214
As I read through this -- is the crux of the problem, essentially, that every instance of the same category shares the same HTML ID, and therefore it affects all the instances of that filter on the page?
If that's the case, why not just remove the ID entirely? I ask because of what I see on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label:
Alternatively, you can nest the directly inside the , in which case the for and id attributes are not needed because the association is implicit.
Would this not solve the problem? It would be quite a bit simpler and cleaner if it does.
Edited by Adam G-H changed this line in version 6 of the diff
added 3 commits
-
aeb55ad6...967fba8e - 2 commits from branch
project:2.0.x
- fcd6a48c - Merge branch '2.0.x' into 3511942-the-filters-are
-
aeb55ad6...967fba8e - 2 commits from branch
added 2 commits
Please register or sign in to reply