primeng icon indicating copy to clipboard operation
primeng copied to clipboard

AutoComplete input value not cleared on model change

Open Ketec opened this issue 9 years ago • 9 comments

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

[x] bug report => Search github for a similar issue or PR before submitting
[ ] 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

Current behavior If you type anything into the autocomplete input field and wont select anything or edit existing selection - you cannot clear the value by changing ngModel. Expected behavior Value updates or is cleared without selecting anything from the list.

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 2.0.X 4.1.2

  • PrimeNG version: 2.0.X 4.0.0

Input should update fine if ngModel is used instead of value bind.

Ketec avatar May 15 '17 14:05 Ketec

Same here. Changed variable that is binded to ngModel but input value doesn't change. Can you provide a workaround ?

ohadinho avatar May 27 '17 10:05 ohadinho

The issue is replicated. Please follow this issue status from this issue number https://github.com/primefaces/primeng/issues/2882

sudheerj avatar May 27 '17 11:05 sudheerj

Can you write the Correct issue number??

On May 27, 2017 14:42, "Sudheer Jonna" [email protected] wrote:

Closed #2778 https://github.com/primefaces/primeng/issues/2778.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/primefaces/primeng/issues/2778#event-1099869052, or mute the thread https://github.com/notifications/unsubscribe-auth/AEqcugAs97x7T7LJL9NPoyzIJOKt0J3Iks5r-AwXgaJpZM4NbMSw .

ohadinho avatar May 27 '17 11:05 ohadinho

Sorry.I updated the issue number.Thanks.

sudheerj avatar May 27 '17 11:05 sudheerj

Same issue ... waiting for solution

ghost avatar Aug 09 '17 06:08 ghost

this is my workaround http://plnkr.co/edit/lDttb5VIq8257pNIExTr?p=preview

marcinkrajewski avatar Aug 11 '17 15:08 marcinkrajewski

nice workaround @marcinkrajewski

Ninja-Coding-Git avatar Sep 08 '17 15:09 Ninja-Coding-Git

@marcinkrajewski Where does that AutoComplete type come from on L14? I tried this solution but that type was not recognized.

stusquared avatar Oct 13 '17 12:10 stusquared

@photostu localy i've added import {AutoComplete} from 'primeng/components/autocomplete/autocomplete';

marcinkrajewski avatar Oct 13 '17 13:10 marcinkrajewski