enterprise
enterprise copied to clipboard
Datagrid: Add ability to have an icon on the datagrid header with a tooltip
Is your feature request related to a problem or use case? Please describe.
In landmark we have a new feature for fields called "mouse over text". When a customer defines this text we place an icon next to the fields label. When the user hovers over that icon we build the text (lazily) and display the tooltip. We'd like to be able to have this for datagrid headers as well.
Here is an example of it on a form
Describe the solution you'd like
- We'd like to be able to place an icon on each header in a datagrid that has our "mouse over text" to work in the same manner. This "mouse over text" should only display when hovering over the icon.
- Have a beforeOpen callback to be able to lazily build our mouse over text to display in a tooltip.
- Have the ability to place a class on the header element so we can scope some necessary css changes.
A note on the mouse over text feature: it's NOT to be considered help text, and hence no content here is delivered, but just something the customer can configure for "important" fields where they want to have some "instructive" text.
Describe alternatives you've considered
Additional context This is being asked for from Koch And what application do you work on? Landmark
Related issue is https://github.com/infor-design/enterprise/issues/4596
Similar to https://github.com/infor-design/enterprise/issues/4596
Question: What if there is a header tooltip already? Can that happen? I.E. how should we integrate this with the tooltips on header?
@tmcconechy I was thinking when we did a mouse over on the icon in the table header we'd see this special "mouse over text". Mouse over anywhere else and see the normal table header tooltip. What do you think?
Yeah i guess thats the only way but i think its bad from a usability standpoint perhaps to have two tooltips for the same small area. Anyway you dont have two tooltips just one or the other?
With a callback function lmclient could build the tooltip where we can just combine the column title and the "mouse over text".
The info icon would just be an indicator of extra information?!
Kinda like that! - but whats in your header tooltips? Anything or just the header when it is doing the .... thing?
Just the header name when it's doing the ... thing. So it seems that we'd take over all tooltip handling in the case of the idea above when we do a beforeTooltip callback.
Ok then i like the solution you suggested...
Way i would do this is
- setting for which icon to show
- put it between the text and the sort icon (if there/sortable)
- separate setting for additionalHeaderTooltip text that shows on hover of the icon or on an ellipsis column
@tmcconechy @ericangeles which IDS version will this be scheduled for?
4.66 in early August
QA tested. When I changed the row height, the label "Product Name" in the tooltip was missing. https://main-enterprise.demo.design.infor.com/components/datagrid/example-header-icon-with-tooltip.html
https://user-images.githubusercontent.com/102151352/182290015-d3ee2b8f-4a8a-465c-bad3-1c1c51ca1e55.mov
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue should have been closed. It works now on the linked PRs and is now supported