Right now the distinct selective items are arbitrary limited to 100. Remove the hardcoding of this value. Allow the admins to set this but default to 100.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

claudiu.cristea’s picture

Status: Active » Needs review
FileSize
2.14 KB
david_garcia’s picture

Tested and works great, nice contribution.

I am missing though some validation on the field, so that it will only allow positive numbers in it.

Patch attached that uses a standard drupal validation function instead of having one of our own.

claudiu.cristea’s picture

+++ b/views_handler_filter_selective.inc
@@ -153,6 +153,14 @@ class views_handler_filter_selective extends views_handler_filter_in_operator {
+      '#element_validate' => array('element_validate_number'),

Is that validator accepting 0 or empty? Because in my app I need no limitation.

claudiu.cristea’s picture

FileSize
2.22 KB
755 bytes

Unfortunatelly element_validate_number() validates also: -3, 14.4 and so on. Here a more correct validator but this doesn't accept 0. But this is fair, for "no limit" just let the text field empty.

david_garcia’s picture

Just made a small change, to prevent the "limited the results" message to show when there are no results, and no limit has been set.

  • david_garcia committed b2ddd85 on 7.x-1.x
    Issue #2414249 by claudiu.cristea, david_garcia: Let the admin decide...
claudiu.cristea’s picture

Status: Needs review » Fixed

thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.