Closed danraps closed 2 years ago
I appreciate the PR, but I won't be adding this feature as-is at this time.
I would really like to keep this as a 0-dependency component and adding the svelte-range-slider-pips
dependency would prevent that. It's licensed as MIT so you're more than welcome to fork this though if you need to for your needs.
As an aside, even though that dependency is bundled into the build outputs, using inside another svelte project would throw an error, since svelte-range-slider-pips
is listed as a devDependency.
Could you implement with a component? I think the header filter cell could support passing a component and interact with the column filter similar to renderComponent
.
I threw this together for a specific need I had at work and thought it might be useful for others, but you raise some very valid points!
When I get a bit of free time, I’ll rework it with the implementation you suggested, since that would allow for more use cases and be more consistent with the rest of your package anyway. Thanks for the recommendation!
I've created the ability to have a two point range slider (c/o svelte-range-slider-pips) for columns. To use it, you can add the
rangeValues
key andfilterOptions
to 'range' for the specific column entries.