Gbuomprisco / ngx-chips

Tag Input component for Angular
MIT License
902 stars 359 forks source link

Replace default placeholder when new placeholder text is provided. #829

Closed rspandi1985 closed 6 years ago

rspandi1985 commented 6 years ago

PLEASE MAKE SURE THAT:

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

[ ] bug report => search github for a similar issue or PR before submitting
[ ] support request/question

Notice: feature requests will be ignored, submit a PR if you'd like

Current behavior If I change placeholder text, it will still show old placeholder 'Enter a new tag' until you add at least one item.

Expected behavior It should show new placeholder on initial load and not wait for addition of one item.

Minimal reproduction of the problem with instructions (if applicable)

What do you use to build your app?. Please specify the version angular-cli,

Angular version: angular 5

ngx-chips version: 1.9.8

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] chrome

Gbuomprisco commented 6 years ago

You have two placeholders [placeholder] and [secondaryPlaceholder]. You can change them or remove them by providing an empty string.

rspandi1985 commented 6 years ago

Yes, but it does not replace it immediately. Only after adding first item. check this issue https://github.com/Gbuomprisco/ngx-chips/issues/338

I could not find any solution in that issue. Is it possible to replace it even when tag input is empty?

Gbuomprisco commented 6 years ago

If I use this code, it works:

<tag-input [(ngModel)]="empty" [placeholder]="'A different placeholder'" [secondaryPlaceholder]="'A different placeholder again'"> </tag-input>

Can you paste your code?

Zabbas2006 commented 5 years ago

By any chance can we change the font of placeholder to italics?