feat: add "value" to default scope slot #459
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi 馃憢
First let me thank you for this library, we are using it on multiple projects and we are really happy about it!
We are working with Algolia Vue InstantSearch and we created a custom range slider.
It looks like this and it works fine:
However, we want to display the current slider's value while dragging and when
lazy
enabled (which prevent useless and costlyrefine()
calls, to Algolia), like the following screens:I was able to make it working by:
vue-slider
component (slider
)sliderValue()
which returnsgetValue()
from refslider
vue-reactive-refs
since ref are not reactiveAn other alternative would be to remove
lazy
property and use a custom debounce function for Algolia'srefine
, but I don't know if it will works sincerefine
is a scoped props... And I don't want to use a ref, the less you use them, the better you feel 馃槄I think you will agree with me that both solution are not ideal. In this PR, I propose to send
getValue()
to thedefault
slot's scope:What do you think?
Thank!