I have grid and action column in this grid. When I click on action column on grid it displays menu. when I clicked anywhere else after menu shown, menu gets hide.
But when I scroll grid with mouse wheel, menu doesn't hide. Instead its position changes as per scrolling...so I want solution for this to handle this situation so that I can hide menu on mouse-wheeel scroll
Hi Could you please add this in the afterRender of your grid
this.body.on('scroll', this.handleScroll);
handleScroll: function() {
//hide your menu.
},
Hope it helps you.
Related
I have this combo with a custom picker that collapses when:
First scenario:
Combobox collapses on toolbar click.
Clicking anywhere on the toolbar, beside the button - this worked fine in the previous version of ExtJs 6.2.0.589
Second scenario:
Combobox collapses on tooltip click.
Expand combobox picker and click 'Show tooltip' button, then click 'do NOT collapse combo on click' checkbox or anywhere inside the tooltip.
Help is much appreciated,
Thanks.
I have a scenario i.e.combobox and a button. I want to show a tooltip on combox when I click on a button and hide it when i click again. How do I do that without using ids on tooltip instance? Also can I specify the position of tooltip i.e x and y relative to combobox and style tooltip a little bit?
Thanks a lot
When you click on button create new tooltip instance as below:
Ext.create('Ext.tip.ToolTip', {
html:<tip contents>,
id:<some id>
});
And showBy() this instance for that combo like tip.showBy(<combo instance>).
Now again you click on button you check if tip instance is present, if yes then hide it else show it again. But you will need some id for tooltip.
i have a problem when i add event trigger to a grid. I want when right mouse is clicked anywhere on a grid a menu to pop up, the problem is when i click somewhere in the grid where there is a stack panel for example the menu doesn't pop up. Any ideas?
I noticed that every time I open and close (by clicking on a menu item or clicking at some area out of the menu) a contextmenu (Ext.menu.Menu) the <div>s won't get removed from the DOM, they somehow just get invisible.
How to change this?
You can try this to destroy entire component -
listeners: {
hide:function(menu, opt){
Ext.destroy(menu);
}
}
But you have to create Ext.menu.Menu, when click menu button next time.
has anybody had the need to add an extra button to the grid panel header menu(sorting\columns)?
potentially I would like to add another button to the menu that resets to the default columns model. I can accomplish this using Jquery but I was wondering if there is an EXTjs way to do it.
Thanks
You need to dig through the source to see it's there, but a GridPanel has a view property which is its GridView which in turn has a hmenu property which is the menu it shows when you click on one of those column headers.
So, with a GridPanel called gridpanel (once it's rendered) you can do the following:
gridpanel.view.hmenu.add({
text: 'reset',
handler: function() {
// reset magicks
}
});