Passing custom template to loadMore slot
See original GitHub issueBug 🐞
What is the current behavior?
It’s not possible to customise Show more
button when passing custom template to default
slot, because loadMore
slot is nested inside it.
loadPrevious
slot is fine.
Make a sandbox with the current behavior
https://codesandbox.io/s/vueinstantsearchapp-wypg0
What is the expected behavior?
To work the same as “Show previous”.
Does this happen only in specific situations?
No.
What is the proposed solution?
Move loadMore
slot outside of default
slot, the same way as loadPrevious
.
What is the version you are using?
2.2.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Using templates and slots - Web Components | MDN
Slots are identified by their name attribute, and allow you to define placeholders in your template that can be filled with any markup...
Read more >How to pass a custom template to an Angular component?
Solution #1: Multi-slot content projection. Content projection is simple to use and provides a clear to read syntax, which is always a plus....
Read more >Passing data from a component that contains slot content to ...
1 Answer 1 · template · div · h2 · h2 · layout-card-overflow · slot · slot · layout-card-overflow ...
Read more >Assign content to multiple slots in LWC: how to insert the same ...
I would recommend you to create 2 slots in your c-card component ( header and footer ), and to create another component c-actions...
Read more >Shadow DOM slots, composition
Just like built-in browser <select> expects <option> items, our <custom-tabs> may expect the actual tab content to be passed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I imagine here: https://www.algolia.com/doc/api-reference/widgets/infinite-hits/vue/#widget-param-loadmore
Something like:
No worries, just posting a code example for anyone else that stumbles on the issue to save them time 😃