-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SohoSearchfield: Update generates new template element #1186
Comments
Hi, this still seems to be an issue. Any idea when this might be fixed? Thanks |
We can move it up in the backlog. But re-reading this im not sure how to tackle it. Can you maybe add a way to reproduce this using stackblitz. https://stackblitz.com/edit/ids-quick-start-1311 Specifically steps 1,2,3 are not clear. What kind of template? Where does the code go? Which page do i run? Usually a good issue would be..
|
Thanks for responding Tim. Well, it's not reproducible via Stackblitz. But with essentially the same code, it's reproducible for example in this IDS repro project (In case you do, just go to the Searchfield Updated tab, open the inspector and click the update button) |
QA Passed. v4.62.0-dev |
Describe the bug
Linking to this issue. While implementing a workaround to select/deselect all categories in a searchfield, I noticed that the updated method on Soho Searchfields apparently (?) creates a new wrapper element in the template instead of updating the old one. See the screenshots below
To Reproduce
Steps to reproduce the behavior:
selectAll() { this.categories$.subscribe((cats) => { cats.map((cat) => cat.checked = true); this.searchfield.updated( {...this.searchfield.options, categories: cats) ); });
I've verified that this also happens if you just pass this.searchfield.options (and not a new object), or if you pass no new object at all.
Expected behavior
The updated method should update the element, not create a new element.
Version
Screenshots
Here's a step-by-step album:
https://imgur.com/a/Jz5tuD7
Platform
Additional context
This bug isn't strictly limited to implementing a select all button outside of the category dropdown, but occurs whenever the updated method is called. Hence, it's related to the linked issue but not caused by it.
The text was updated successfully, but these errors were encountered: