accordion broken with elastic search #44
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have noticed that after adding elastic search accordions do break if serach provides nos results of if button "load more" loads other content.
@chris can you double check this at
https://collections.arc-hive.zone/s/collections/page/index
seems that the js is not writing all the needed
html
codeit first presents this:
then if we do a search and cancel the search or we click the "load more" button, the next view generated has this code
thus proces the accordion to malfunction... might be also an issue between js from elasticsearch and foundation-accordion
the main different part for the code to work in each single accordion is the randomly generated
id
for the<a>
element, in this example isaria-controls="5zkrhv-accordion"
wich is used for accessibility.Hi @jorge
I think the problem was that foundation js only works on accordian items that are rendered when the page loads. In our case, with the 'Load more' button, we are adding more items, items that are not registered on document.load.
So, I have removed some tags
https://git.hangar.org/arcHIVE-tech/Arc-hive-list/src/branch/main/src/components/archiveList.vue#L67
and handle item exapnd/collapse with custom js
https://git.hangar.org/arcHIVE-tech/Arc-hive-omeka-theme/src/branch/develop/asset/js/expand-site-list-item.js
How does that seem to you now?
https://dev-archive.hangar.org/s/collections/page/index
foundation makes changes to the html using js, thank you for checking that out :D good
it works nice ... great!!!
so this could be closed.
ok. I've loaded https://collections.arc-hive.zone/s/collections/page/index with the develop branch. You need to do a F5 to reload the js. Works well I think.