You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
since we can not add onclick event to the display, I'm trying to attach event listener to all resuls retreived by the search query.
I'm adding this portion of code to the "_getSearchResults" method of the file "SearchResultsCntainer" : const btn: NodeListOf<Element> = document.querySelectorAll('.template_listItem'); btn.forEach((b: HTMLDivElement) => { b.addEventListener('click', (event: any) => { this.handleClickgetuserproperties(${b.id},${b.lang},${b.title}` ); }, false);
});`
It work only for the first page, when i click next page of pagination, the event is not attached on the 2nd page results.
How can I attach it to all results?
Regards,
Category
Question
Bug
Enhancement
The text was updated successfully, but these errors were encountered:
Hello,
since we can not add onclick event to the display, I'm trying to attach event listener to all resuls retreived by the search query.
I'm adding this portion of code to the "_getSearchResults" method of the file "SearchResultsCntainer" :
const btn: NodeListOf<Element> = document.querySelectorAll('.template_listItem'); btn.forEach((b: HTMLDivElement) => { b.addEventListener('click', (event: any) => { this.handleClickgetuserproperties(
${b.id},
${b.lang},
${b.title}` ); }, false);It work only for the first page, when i click next page of pagination, the event is not attached on the 2nd page results.
How can I attach it to all results?
Regards,
Category
The text was updated successfully, but these errors were encountered: