I'm using file upload from PrimeNG : https://www.primefaces.org/primeng/#/fileupload
For now, I have this
But I would like to have only "Choose" and "Cancel" buttons.
So on primeNG website, they say to use showUploadButton="false"
But it's not working.
Refering to this post : Remove File Upload and Cancel Button from Primefaces p:fileUpload
I tried :
<p-fileUpload ... showButtons="false" showCancelButton="true"/>
then I tried
.ui-fileupload-buttonbar .ui-fileupload-upload {
display: none;
}
Nothing works. Maybe it's because it was refering to another version. I'm using version of primeNG 2.0.6 and angular 2.4.0
You have to put the showUploadButton inside of a bracket for it to work.
<p-fileUpload [showUploadButton]="false"></p-fileUpload>
Result
EDIT: You need to get the latest version of PrimeNG to work with Angular 4. Since Angular launched their Angular 4, PrimeNG has also launched PrimeNG v4 to work with Angular 4
have you tried to do like this:
<p:fileUpload ... [showButtons]="false" [showCancelButton]="true"/>
Hope it helps you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With