Comments

uzlov created an issue. See original summary.

uzlov’s picture

StatusFileSize
new3.23 KB
andypost’s picture

Status: Active » Needs review
andypost’s picture

Version: 8.x-1.2 » 8.x-1.x-dev
Status: Needs review » Needs work
  1. +++ b/src/Controller/ViewsAutocompleteFiltersController.php
    @@ -100,7 +100,7 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
    -  
    +
    
    @@ -200,7 +207,7 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
    -  
    +
    
    @@ -210,7 +217,7 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
    -  
    +
    
    @@ -231,7 +238,7 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
    -  
    +
    

    better keep as is

  2. +++ b/src/Controller/ViewsAutocompleteFiltersController.php
    @@ -172,6 +172,13 @@ class ViewsAutocompleteFiltersController implements ContainerInjectionInterface
    +      // Need to reset the default values for exposed filters.
    

    better to tell why

uzlov’s picture

1. it's just empty spaces (I gess, beetter do this cleanup, no?)
2. the answer in comment and code before

    // Collect exposed filter values and set them to the view.
    if (!empty($expose_options['autocomplete_dependent'])) {
      $exposed_input = $view->getExposedInput() ;
    }
    else {
      $exposed_input = [];
...

If disabled option "autocomplete_dependent" (Suggestions depend on other filter fields), it means need to reset possible default falues for exposed filters.

uzlov’s picture

StatusFileSize
new1.7 KB

Restored the empty spaces.

uzlov’s picture

Status: Needs work » Needs review
andypost’s picture

Assigned: uzlov » Unassigned
Status: Needs review » Reviewed & tested by the community
nikita_tt’s picture

Thanks for the patch. I added a few lines for grouped filters with a default value.

colan’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/js/views-autocomplete-filters-dependent.js
@@ -149,7 +149,13 @@
+            if(!data_string.data[value['name']]) data_string.data[value['name']] = []

Missing whitespace after `if`.

colan’s picture

Status: Needs work » Needs review
StatusFileSize
new898 bytes
new3.53 KB
new4.08 KB

Actually, ViewsAutocompleteFiltersController->autocomplete() is way too long already. Let's not make it worse.

Also, here's the missing interdiff from #9.

colan’s picture

Sorry; I forgot to pass a variable into the new method.

vasike’s picture

It seems there could be some related issues and their patches ...

So added as related issues to be taken into account ...

vasike’s picture

Status: Needs review » Needs work

i put it back in "Needs work" to make sure about related issues

colan’s picture

Status: Needs work » Needs review

Please don't create deadlock by setting a collection of independent issues to NW.

colan’s picture

  • colan committed ee8bc06 on 8.x-1.x authored by uzlov
    Issue #3083093 by colan, uzlov, nikita_tt: Added correct handling for...
colan’s picture

Status: Needs review » Fixed

Thanks all!

Status: Fixed » Closed (fixed)

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