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

p-autocomplete bug in field based object mapping #910

Closed
maleet opened this issue Sep 15, 2016 · 6 comments
Closed

p-autocomplete bug in field based object mapping #910

maleet opened this issue Sep 15, 2016 · 6 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@maleet
Copy link

maleet commented Sep 15, 2016

There is template code:

<span [ngClass]="{'ui-autocomplete ui-widget':true,'ui-autocomplete-dd':dropdown}" [ngStyle]="style" [class]="styleClass">
            <input *ngIf="!multiple" #in pInputText type="text" [ngStyle]="inputStyle" [class]="inputStyleClass" 
            [value]="value ? (field ? resolveFieldData(value)||value : value) : null"

So if I have object as value and there is field in this object with undefined value then value is set to [value] with result [object Object] as string

example:

p-autocomplete field="something"
value: {something:undefined}

Something like:

[value]=\"value ? (field ? resolveFieldData(value)||'' : value) : null\"
jo75 pushed a commit to jo75/primeng that referenced this issue Feb 7, 2017
@cagataycivici cagataycivici self-assigned this May 31, 2017
@cagataycivici cagataycivici added the Status: Pending Review Issue or pull request is being reviewed by Core Team label May 31, 2017
@cagataycivici cagataycivici added this to the 4.0.4 milestone May 31, 2017
@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jun 12, 2017
@lukgit17
Copy link

this solution is not working when search, select with enter result from list and press tab. Text in autocomplete will be empty.

@bakasmarius
Copy link

bakasmarius commented Jul 19, 2017

After updating from 4.0.3 to 4.1.0-rc.1 (or 4.1.0) autocomplete is also empty for me after selecting a value from suggestions.
The value itself is set, it is also visible in a generated html in "ng-reflect-model" - it just isn't visible in autocomplete field. It is visible while typing, but after selecting it with enter key or mouse - it's gone.
It's feels like it's gone invisible...
Should we change something in our code, or is it a bug?

It might also be connected with #3147, I'm not sure

@igogu
Copy link

igogu commented Jul 31, 2017

I have the same error than @bakasmarius with the same version. I have to get primeng 4.0.3 for getting autocomplete working again.

@bakasmarius
Copy link

It's still not fixed in 4.1.2 - in which version can we expect a fix? Is there a temporary workaround?

@bakasmarius
Copy link

I thought fixing #3360 would fix this, but I still get the same broken functionality in 4.2.0-rc.1...
Am I the only one?

@bakasmarius
Copy link

@cagataycivici - me and other developers are forced to use 4.0.3 because of this issue. I managed to work around it using some hacks, but I still need to create an additional array or object that holds the default autocomplete values as they are not shown when the page/component loads.

Could you PLEASE tell us how to implement the new functionality of autocomplete correctly? Or could you maybe add an option so that it could work both ways?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

5 participants