Closed (works as designed)
Project:
Range
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2019 at 22:54 UTC
Updated:
17 Nov 2020 at 17:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
taran2lHi @mstef,
There are views normal and contextual filters that do exactly what you are asking for.
Best
Comment #3
mstef commentedHow would you set that up with a single exposed filter?
Comment #4
taran2lComment #5
int_ua commentedDid you mean a built-in exposed filter? I don't see any reasonable settings for that one, it's just shown as a single numeric input that disregards value limits set for the
rangefield, see the screenshot attached.Did you mean another projects that provides a better default input? I can't find anything with "view filter range site:drupal.org" search request. https://www.drupal.org/project/views_numeric_range_filter is not what it seems and it's only for 7.x anyway.
Comment #6
taran2lhi @int_ua, basically filter on the screenshot does exactly what this issue is about.
What's wrong with the settings? Why are they not reasonable/sane to you?
Comment #7
int_ua commentedI understand that you probably don't have time for this, but ideally I see it as a jQuery UI Slider with settings for min, max, step, values, range, maybe even custom handle with value displayed. Maybe it's already possible with Better Exposed Filters? But something is missing for that as I have BEF and jQuery UI Slider for Drupal installed. Does it have to be implemented in range or in BEF? For now I'll probably have to resort to
custom twig templatecustomhook_form_alter.In current state I don't see any effect of the "Include endpoints" setting but it's possible I misunderstood the meaning of it. And at least ability to set min, max, step, size
and valueHTML attributes of the defaultinput type="number"from views filter settings would've been reasonable IMHO.Comment #8
int_ua commentedWorkaround module:
Comment #9
int_ua commentedBut I cannot change type this way. See https://drupal.stackexchange.com/q/298134/7177
Comment #10
taran2lhi @int_ua, thanks for your suggestions. I think some of them does make total sense:
jQuery UI is not supported anymore, the last release dates back to 2016. Also, it is deprecated for D8/9: https://www.drupal.org/node/3067969 Taking this into account, jQuery UI Slider won't be included in the module
I'm not aware of any existing implementation of the in BEF
Let's say there is a node with an integer range set to
5-7and 5 has been selected as a value. With Include endpoints checked that node will be present (i.e. the condition will be FROM >= 5), otherwise - node will be filtered out (i.e. the condition will be FROM > 5). When using Range not contains filter everything is oppositeSeems like a reasonable request to me. Could you create a new issue for that?
Well, afaik it should work like that. Exposed form display is part of the core. Range module does not alter it in any way.
Comment #11
taran2l