primeng icon indicating copy to clipboard operation
primeng copied to clipboard

showUploadButton ="false" not working

Open ketimaBU opened this issue 9 years ago • 5 comments

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

ketimaBU avatar Jul 22 '17 19:07 ketimaBU

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

ghost avatar Jul 22 '17 23:07 ghost

I am sorry, I feel stupid thanks

ketimaBU avatar Jul 23 '17 12:07 ketimaBU

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

Mrtcndkn avatar Jul 24 '17 06:07 Mrtcndkn

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

ajcastro avatar Sep 26 '18 13:09 ajcastro

@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=""

guardiannite avatar Feb 11 '19 21:02 guardiannite