You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Everyone,
I have a situation where I'm trying to list the number of entries by users. But a few of them are quite long and are making the layout ugly and unfortunately, I'm unable to find the solution for the same in the docs(sorry if I missed it in the docs)
So I wanted to ask if is there a way to
Achieve ellipsis on the long text(entries) or
Some sort of column_width preferably with min and max options to help even if we resize the shell/terminal.
Please let me know if we can achieve any of the above.
If there is no direct then I'm thinking of a solution like is to create a mutable vector with a capacity of user_entries.len() and then manipulating the entry with \n (if it reaches a certain word count).
Please let me know if this is a good approach to the problem or if there is any workaround available please do let me know.
Thank you
The text was updated successfully, but these errors were encountered:
Hey @zhiburt thank you for the solution.
From the above-given resources this one got perfect with my use-case - table.with(Modify::new(Segment::all()).with(Width::wrap(5)));
with(Modify::new(Segment::all()).with(Width::truncate(3).suffix("..."))); this one also worked but if the user want to read out the full entry then it would be a pain(I guess) to add some logic of read more/expand etc
Therefore going with the first solution.
Thank you for helping :-)
Hello Everyone,
I have a situation where I'm trying to list the number of entries by users. But a few of them are quite long and are making the layout ugly and unfortunately, I'm unable to find the solution for the same in the docs(sorry if I missed it in the docs)
So I wanted to ask if is there a way to
Please let me know if we can achieve any of the above.
If there is no direct then I'm thinking of a solution like is to create a mutable vector with a capacity of user_entries.len() and then manipulating the entry with
\n
(if it reaches a certain word count).Please let me know if this is a good approach to the problem or if there is any workaround available please do let me know.
Thank you
The text was updated successfully, but these errors were encountered: