Unplanned
Last Updated: 28 Mar 2023 08:33 by ADMIN
n/a
Created on: 28 Mar 2023 08:23
Category: Upload
Type: Feature Request
1
Change the "Select files..." text to "Select file..." when multiple prop is set to false

The Upload component has the option to configure it to accept single or multiple files for upload. 

When the component is configured to accept only one file, the text in its Select button should be in singular form - "Select file..." instead of "Select files..."

1 comment
ADMIN
Petar
Posted on: 28 Mar 2023 08:33

Hello, Christian. 

Just in case someone wants to implement the same functionality as the one requested in the current item before the Feature request is implemented, below I will share the workaround we suggested in our private communication. 

This StackBlitz example demonstrates an approach that can be used as a temporary solution to change the text inside the Upload, based on the value passed to the multiple property. 

The example uses the following created method definition that dynamically changes the text inside the Upload component. 

created() {
    const bgMessages = this.multiple
      ? {
          upload: {
            select: 'Select files...',
          },
        }
      : {
          upload: {
            select: 'Select file...',
          },
        };
    loadMessages(bgMessages, 'bg-BG');
}

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.