Primeng: showUploadButton ="false" not working

Created on 22 Jul 2017  路  5Comments  路  Source: primefaces/primeng

Hi,
the showUploadButton setted false is not working is still showin the upload button
regards

Most helpful comment

[showUploadButton]="false" or [showCancelButton]="false"

All 5 comments

[showUploadButton]="false" or [showCancelButton]="false"

I am sorry, I feel stupid thanks

I think the problem is solved according to @nni123's answer.

Why it is solved with square brackets? I thought square brackets are for variables

@ajcastro You are correct, square brackets are for variables, but when you don't use them, the value gets treated as a string. The string "false" in JavaScript is actual a truthy statement. MDN Web Docs - Truthy

Any non empty string will get treated as true.
e.g.
showUploadButton="true"
showUploadButton="pizza"
showUploadButton="false"

If you wanted to set it to false and not use square brackets, you could set it to an empty string:
showUploadButton=""

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pchristou picture pchristou  路  3Comments

Helayxa picture Helayxa  路  3Comments

garethlewis picture garethlewis  路  3Comments

KannanMuruganmony picture KannanMuruganmony  路  3Comments

jisqaqov picture jisqaqov  路  3Comments