p-autocomplete bug in field based object mapping
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\"
this solution is not working when search, select with enter result from list and press tab. Text in autocomplete will be empty.
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
I have the same error than @bakasmarius with the same version. I have to get primeng 4.0.3 for getting autocomplete working again.
It's still not fixed in 4.1.2 - in which version can we expect a fix? Is there a temporary workaround?
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?
@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?