question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File uploader button labelText changes to name of file when a new file is added

See original GitHub issue

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you’re having. When a file is added using the FileUploaderButton it changes it’s labelText to be the same as the file’s name.

Is this issue related to a specific component? FileUploaderButton

What did you expect to happen? What happened instead? What would you like to see changed? I would like the labelText of the button to not change when a file is uploaded

What browser are you working in? Chrome

What version of the Carbon Design System are you using? 10.10.3

Steps to reproduce the issue

  1. Use a file uploader button
  2. Upload a file
  3. See the labelText of the button change to the name of the file

Please create a reduced test case in CodeSandbox

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Donisiuscommented, Apr 20, 2020

Cool, thanks for the reply! 😄

1reaction
emyarodcommented, Apr 20, 2020

currently only the drag and drop file uploader has hooks for the delete event, related issue for the standard file uploader here https://github.com/carbon-design-system/carbon/issues/5851

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hot to change the button label for lightning-file-upload?
The button label is "Upload Files" by default. Use the label attribute to add a descriptive label above the Upload Files button.
Read more >
Labeling file upload button - html - Stack Overflow
This is the only correct answer to the question here. It's relatively simple to re-style a file input element without alerting the user...
Read more >
<input type="file"> - HTML: HyperText Markup Language | MDN
Once chosen, the files can be uploaded to a server using form submission ... file to upload</label> <input type="file" id="file" name="file" ...
Read more >
Form controls · Bootstrap v5.0
Give textual form controls like s and s an upgrade with custom styles, sizing, focus states, and more.
Read more >
How to customise a file upload control - Hidde's blog
it can show the file name of the upload file · it can be used with just a keyboard · on phones, it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found