- 🇮🇳India ankitdebnath
Hey @trickfun, to implement this functionality quickly, I have used the following approach:
- Added a new class 'custom-scroll' to the Load more button.
- Added 'hide' class to hide the Load More button.
- Created libraries.yml file and added a library.
- Created a JavaScript file, included it in the library, and attached the library to the field formatter (similar to how core/drupal.ajax is attached).
- In the JavaScript file, obtained the custom-scroll element and measured its height.
- After scrolling to a particular height, triggered a click event on the Load More button from the JavaScript file.
I know this should not be the actual implementation of this, but I hope it helps.
Let me know if you want more information.