Description
Clear and concise description of the problem
I would like to see the swiper instance being added as parameter to the renderBullet
function, just as it exists for renderCustom
already, so that one has more ways to customize the content of the bullet elements.
Suggested solution
Change renderBullet
to function(swiper, index, className)
, so that a user can use properties of the swiper instance to modify the bullets.
Alternative
No response
Additional context
My use case would be to add custom text from slides to the bullets. Currently one has to store that custom text in a separate array and access this through the index
parameter.
renderCustom
does provide a reference to the swiper instance where one could get text from a slide directly, but it only prints the current item in the pagination. So, it would be nice if renderBullet
could do the same while printing multiple items.
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Would you like to open a PR for this feature?
- I'm willing to open a PR