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
{{ message }}
Repository navigation
[EuiCombobox] allow for multiline options of different height #7712
Is your feature request related to a problem? Please describe.
Although middle-truncation and auto-expansion alleviate most issues with long names, allowing multi-line will be a better approach in some circumstances. Our problem is specific to the users that have long field names in Kibana.
Quoting the customer:
“This is very frustrating, here: we have a huge list of fields. Some fields you cannot see here, because all the prefixes are the same. What I have to do is see the HTML code and copy the field.”
Right now the customer goes to Stack management and look at field names there — that's quite painful for them.
Describe the solution you'd like
It'd be good to allow not to truncate at all, but instead allow multi-line options.
Yes, it will! Virtualization will be able to be disabled which will allow for height: auto type configurations. With caveats of course that it's a performance cost for high numbers of options.
I think this is important, we did everything possible on our side to visualize fields with super long names (which is unfortunately very frequent) but we need multiline with middle truncation in order to fix it once and for all.
Although, as everything, it will depend on the effort this takes, if this is a crazy project we can discuss deprioritizing it.
I mentioned this in the related Slack thread, but I'll comment here as well for visibility.
I agree that supporting line breaks or multiple lines will help users to identify long fields that are currently being truncated. However, I fear it would also inadvertently create a lot of redundancy and repetition in large portions of the text strings, which will again result in difficulty reading and identifying fields.
That said, what if we were to group fields by their name hierarchy to reduce that redundancy and also use it as a means to make identification easier (regardless if truncated, with line breaks, or neither)? Here's a rough example of what I'm thinking.
Just a note for posterity -- I'm lowering the priority of this to Low in the EUI Github project, but keeping a High priority on #2841. 2841 is ultimately the fix we need to make, and we'll close this issue with the completing of 2841.
After evaluating a few options and trying, unsuccessfully, to find an alternative easy fix (by zooming out), my suggestion is to simply follow the original suggestion above: to make virtualization of the list optional ("on" by default).
So the solution I propose is to allow variable heights for the list options by making virtualization optional.
in order to handle layout more easily for multi-line (EuiFilterSelectItem uses .eui-textTruncate, so there's "double truncation")
to not break existing usages of EuiFilterSelectItem in Kibana (~16)
to make it easier to deprecate by removing the interdependency
(truncation won't affect renderOption (will test first))
add the "auto" option for the rowHeight prop, which will
render the options list without virtualization
not truncate text and have text wrap (including word-space: break-word)
Avoiding adding new props like isVirtualized and textWrap is intentional.
Other thoughts
To achieve the hierarchical groups proposal from Michael (above) having variable heights is also needed (no?), with the refactor it will be possible by setting rowHeight to auto and using the renderOption prop to render the option layout "breaking" the label…
Multi-line truncation should be also possible by: setting rowHeight to a value that fits n lines; and using renderOption to use EuiTextBlockTruncate (with n lines) (search value highlighting must be also implemented there).
@elastic/eui-team any thoughts or objections to this?
@mbondyra this should fulfill the need, but maybe you have different ideas (it's been a while), any thoughts or feedback is very welcome 🙏
@mbondyra Raising this here -- It's not clear to me whether or not the solution in #8934 solves this issue. It will not wrap text that has no line breaks, like the example that you shared.
I put up a new PR with a one-liner that will fulfill the request completely (#9063).
In the initial PR (#8934) I oversaw the CSS overflow-wrap property, while attempting only using word-break. The thing I wanted to avoid then was having words in regular sentences be broken abruptly or awkwardly.
Activity
JasonStoltz commentedon May 14, 2024
@cee-chen Did we decide that this issue will be solve by #2841?
cee-chen commentedon May 14, 2024
Yes, it will! Virtualization will be able to be disabled which will allow for
height: autotype configurations. With caveats of course that it's a performance cost for high numbers of options.teresaalvarezsoler commentedon May 30, 2024
I think this is important, we did everything possible on our side to visualize fields with super long names (which is unfortunately very frequent) but we need multiline with middle truncation in order to fix it once and for all.
Although, as everything, it will depend on the effort this takes, if this is a crazy project we can discuss deprioritizing it.
JasonStoltz commentedon May 30, 2024
@teresaalvarezsoler Excellent, this is in our Queue for 8.16. Does that timeline work for you?
teresaalvarezsoler commentedon May 31, 2024
sure, thanks!
MichaelMarcialis commentedon Jun 12, 2024
I mentioned this in the related Slack thread, but I'll comment here as well for visibility.
I agree that supporting line breaks or multiple lines will help users to identify long fields that are currently being truncated. However, I fear it would also inadvertently create a lot of redundancy and repetition in large portions of the text strings, which will again result in difficulty reading and identifying fields.
That said, what if we were to group fields by their name hierarchy to reduce that redundancy and also use it as a means to make identification easier (regardless if truncated, with line breaks, or neither)? Here's a rough example of what I'm thinking.
JasonStoltz commentedon Jan 8, 2025
Just a note for posterity -- I'm lowering the priority of this to Low in the EUI Github project, but keeping a High priority on #2841. 2841 is ultimately the fix we need to make, and we'll close this issue with the completing of 2841.
acstll commentedon Jul 25, 2025
After evaluating a few options and trying, unsuccessfully, to find an alternative easy fix (by zooming out), my suggestion is to simply follow the original suggestion above: to make virtualization of the list optional ("on" by default).
So the solution I propose is to allow variable heights for the list options by making virtualization optional.
The plan
EuiComboBoxOptionsListto replace (the already deprecated)EuiFilterSelectItemwith a simple, internal streamlined componentEuiFilterSelectItemuses.eui-textTruncate, so there's "double truncation")EuiFilterSelectItemin Kibana (~16)renderOption(will test first))rowHeightprop, which willword-space: break-word)Avoiding adding new props like
isVirtualizedandtextWrapis intentional.Other thoughts
To achieve the hierarchical groups proposal from Michael (above) having variable heights is also needed (no?), with the refactor it will be possible by setting
rowHeighttoautoand using therenderOptionprop to render the option layout "breaking" the label…Multi-line truncation should be also possible by: setting
rowHeightto a value that fitsnlines; and usingrenderOptionto useEuiTextBlockTruncate(withnlines) (search value highlighting must be also implemented there).@elastic/eui-team any thoughts or objections to this?
@mbondyra this should fulfill the need, but maybe you have different ideas (it's been a while), any thoughts or feedback is very welcome 🙏
tkajtoch commentedon Jul 25, 2025
No objections from me, the plan sounds good!
JasonStoltz commentedon Sep 26, 2025
@mbondyra Raising this here -- It's not clear to me whether or not the solution in #8934 solves this issue. It will not wrap text that has no line breaks, like the example that you shared.
acstll commentedon Sep 29, 2025
I put up a new PR with a one-liner that will fulfill the request completely (#9063).
In the initial PR (#8934) I oversaw the CSS
overflow-wrapproperty, while attempting only usingword-break. The thing I wanted to avoid then was having words in regular sentences be broken abruptly or awkwardly.