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

Parameter to change the number of character before trunking of file name. #21

Closed
VincentBe opened this issue Jun 30, 2023 · 5 comments
Closed

Comments

@VincentBe
Copy link

Hi,

I have a problem with the file name displayed in the control. It's limited to a certain fixed number of characters. In my case, I expand the control with the "fullWidth" parameter. The border and the size part are correctly expanded along the form but the file name still trunked with about 18 characters "filename_...xyz.uvw" (leaving much of the control empty).

I found in the code that this text is trunked at 20. Is it possible to change this fixed value to a parameter? Then we can choose it in the view (with a default value of 20).

I think, it's not the best solution because of font behavior (non monospaced typefaces) but a easy to implement solution.

Regards,

Vincent

@viclafouch
Copy link
Owner

Hello !

COuld you share a codesandbox plz ?

@yuya-tani
Copy link

yuya-tani commented Aug 1, 2023

Hi.

I have the same issue, how did you solve this?
I would appreciate it if you could tell me how to do it.

Best regard.

ver. 2.0.4

image

I think it's probably here, but I would appreciate it if you could pass this as a parameter.

image

viclafouch added a commit that referenced this issue Aug 1, 2023
@viclafouch
Copy link
Owner

Hey i

It has been fixed in 2.0.6 ! There is no truncate in JS anymore, CSS handles it now

@yuya-tani
Copy link

Hi.
Thanks for your quick response.
I tried updating to the latest and got the best results.
This library is great and easy to use.

thankful to you!

@VincentBe
Copy link
Author

VincentBe commented Aug 2, 2023 via email

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

No branches or pull requests

3 participants