vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
163 stars 41 forks source link

cds-file custom buttonLabel resets to "Browse" on clearing files #258

Open pawaru opened 1 year ago

pawaru commented 1 year ago

Describe the bug

cds-file custom label resets to "Browse" on clearing files instead of retaining the custom label set using buttonLabel property.

How to reproduce

Stackblitz reproducing the scenario: https://stackblitz.com/edit/clarity-light-theme-clr15-bnzy1c

Steps to reproduce the behavior:

  1. Before uploading any files, button displays the "Custom Label"
  2. After uploading file, the label changes to: a. Filename- In case of single file b. 'X' Files - In case of multiple files
  3. On clearing the input, button displays "Browse" instead of the "Custom Label"

Expected behavior

On clearing the input files using the 'X' button, the label should change to "Custom Label" instead of "Browse"

Versions

"@cds/angular": "^6.3.1",
"@cds/city": "^1.1.0",
"@cds/core": "^6.3.1",
"@clr/angular": "~15.1.0",
"@clr/ui": "~15.1.0",

Clarity project:

Clarity version:

Framework:

Framework version: Clarity Angular v15

Device: