Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Auto truncate length for v-file-input #9349

Closed
mullerch opened this issue Oct 14, 2019 · 1 comment
Closed

[Feature Request] Auto truncate length for v-file-input #9349

mullerch opened this issue Oct 14, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@mullerch
Copy link

Problem to solve

A fixed length of string is not always appropriate in a responsive context, the available width is generally not the same between mobile phones and a desktop.

Proposed solution

When setting the truncate-length property of the v-file-input to "auto", the component dynamically adapts the length of the string by truncating it in the middle, respecting the following conditions:

  1. The name is truncated only if the width of the text (name + size + others) is larger that the width of the input (when it overflows)
  2. If 1. is fulfilled, the name is truncated so that the width of the text equals the width of the input
  3. The input stays always one line height

I would even suggest to put this as the default value.

It could eventually be extended to other components if suitable.

I hope this is technically possible.

@ghost ghost added the S: triage label Oct 14, 2019
@Leespiker Leespiker added T: feature A new feature and removed S: triage labels Apr 5, 2020
@KaelWD KaelWD added this to the v3.0.0 milestone Aug 17, 2021
@KaelWD KaelWD assigned nekosaur and unassigned dsseng Aug 17, 2021
KaelWD added a commit that referenced this issue Aug 17, 2021
Fixes #9349

Co-authored-by: John Leider <john.j.leider@gmail.com>
Co-authored-by: Kael <kaelwd@gmail.com>
@KaelWD KaelWD closed this as completed Aug 17, 2021
@RejownAhmed
Copy link

Why is the truncate-length prop removed in the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants