Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

844
Visualizações
Kendo-Angular: Disable select file button in kendo-upload

I have implemented kendo upload in my angular project

component.html

    <kendo-upload
    #upload
    [autoUpload]="false"
    (select)="onSelectEvent($event)"
  (remove)="onRemoveEvent($event, upload)"
  (upload)="onUploadEvent($event)"
  [multiple]="false"
  [restrictions]="myRestrictions">
  </kendo-upload>

enter image description here

I want to disable the 'Select file' button once the file is selected as in picture and enable once user clicks on clear button or 'X'.

Please help me with your suggestions as I'm new to Kendo and couldn't find documentation.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

The file upload offers a disable attribute. Here is a demo:

https://www.telerik.com/kendo-angular-ui/components/uploads/upload/disabled-state/

So for example:

<kendo-upload [disabled]="hasFile$ | async"> </kendo-upload>

Where hasFile$ is:

public hasFile$ = new BehaviorSubject(false);

If you only use a boolean instead of an observable the change detection won't pick it up

To only disable the button and not the rest of the upload:

(this.upload.fileSelectButton.nativeElement as HTMLElement).classList.add('k-state-disabled');
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda