Premium support for our pure JavaScript UI components


Post by liuyan@honeycombtech »

Hi,
I have some troubles for setting tooltip for column header in scheduler-pro system.

#1: How to can scroll when tooltip shows and mouse in the tooltip?
Now when I mouseover to tooltip and scroll, the tooltip hide.

#2: When the column header has children, I set the tooltip in field 'parent'. Move to the children, the tooltip always shows. How to show tooltip only hovering in field 'parent' not in children fields.

columns={
field: 'parent',
tooltip: '<table>...</table>'
headerRender: ...,
children:[
	{
		field:'son1',
		type:'widget'
	},
	{
		field:'son2',
		type:'widget'
	}
]
}

Thank you in advance.

tooltip-issue.jpeg
tooltip-issue.jpeg (223.08 KiB) Viewed 290 times

Post by Animal »

I don't understand how you get the tooltips there.

The tiny code snippet appears to not be valid.

But the shared tooltip reconfigures itself from data-btip-xxxx properties in the element. So allowOver should get encoded in as data-btip-allowOver=true and that should then be read and used to reconfigure the shared tooltip instance.


Post by Animal »

This appears to be a bug in the Column tooltip configuration processing: https://github.com/bryntum/support/issues/5191


Post by Animal »

You can veto the appearance of the shared tooltip by adding a beforeShow listener to the shared instance.

You can access this using

Tooltip.getSharedTooltip(document.body);

Your beforeShow listener will have to test the context in which the show is taking place because this single instance is used to process all data-btip="Text" attributes in the page. If you do not want it to appear, return false

For now, to change its configuration to add allowOver, the beforeShow listener would have to set that (If it is showing for that context), and clear it otherwise.

When this ticket is fixed, you will be able to access the shared tooltip using

Widget.tooltip

And You will be able to configure the Column with

tooltip : {
    html : "<table><thead>... etc",
    allowOver : true
}

And it will encode the extra configs in data-btip attributes.

You will still need to add the listener to programatically veto the show on child column elements.


Post Reply