Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation for AutoComplete immutable #4103

Closed
lpenet opened this issue Oct 5, 2017 · 3 comments
Closed

Better documentation for AutoComplete immutable #4103

lpenet opened this issue Oct 5, 2017 · 3 comments
Assignees

Comments

@lpenet
Copy link

lpenet commented Oct 5, 2017

There is no guarantee in receiving a response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[X ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

I spent quite some time migrating an angular app from angular 4.0.0 / primeng 4.0.0 to angular 4.4.4 / primeng 4.2.2

What took me most of the time was understanding the changes to the p-autoComplete. Finally, after much tweaking and debugging, I figured that all I had to to was do add

[dropdownMode]="'current'"
[immutable]="false"

to the properties of existing p-autoComplete.

dropdownMode can be understood by reading other tickets and the standard doc. But I found nothing really clear about "immutable". The actual doc "Defines how the suggestions should be manipulated." is quite unclear to me.

So, I suggest that you provide additional doc on this immutable property.

@ryanbonial
Copy link

I'm not sure if it the same issue, but this change tripped me up too. In my case I found that my autocomplete was not showing any results. Adding [immutable]="false" to the autocomplete allowed the results to show, but the actually change I needed was to only set the results once in the autocomplete and exclude the immutable attribute (it defaults to true). Example:

Before (broken):

filterCountrySingle(event) {
   const query = event.query;        
   this.filteredCountriesSingle = []; // <--- this causes a problem
   this.countryService.getCountries(query)
       .subscribe(countries => {
           this.filteredCountriesSingle = countries;
       });
}

After (working):

filterCountrySingle(event) {
   const query = event.query;        
   this.countryService.getCountries(query)
       .subscribe(countries => {
           this.filteredCountriesSingle = [...countries];
       });
}

ldauvilaire pushed a commit to ldauvilaire/primeng that referenced this issue Oct 7, 2017
@cagataycivici cagataycivici changed the title "immutable" property of p-autoComplete Better documentation for AutoComplete immutable Oct 20, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 20, 2017
@cagataycivici cagataycivici added this to the 4.2.3 milestone Oct 20, 2017
@cagataycivici cagataycivici self-assigned this Oct 20, 2017
@cagataycivici cagataycivici removed this from the 4.2.3 milestone Oct 23, 2017
televic-education-ruben added a commit to televic-education-ruben/primeng that referenced this issue Jun 28, 2018
…ersion4 to develop

* commit 'd7fdfc9ff5707543c0dd0d1e55a0dad5aaddc1f9': (1032 commits)
  FIX: correct path in d.ts. and js file
  Duplicate onSelect event removed(docs)
  Fixed primefaces#4112
  Docs for progress spinner
  strokeWidth and fill properties for ProgressSpinner
  Initial drop-in of new p-progressSpinner component
  Add text
  Fixed primefaces#3460
  Fixed primefaces#4168
  Fixed primefaces#4152
  Add serenity
  Add null check
  Fixed primefaces#4148
  Fixed primefaces#4141
  Validation class in calendar component
  Fixed primefaces#4131
  New dev version
  Set version
  Better fix for primefaces#4103
  Fixed AOT error
  ...
@mertsincan mertsincan removed the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 18, 2018
@kathirnk
Copy link

Thanks very much this saved my time.

@teomanofficial
Copy link

Why using those components is that annoying. I mean I assuming you are using them as an inventor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants