Our blazing fast Grid component built with pure JavaScript


Post by amorimluc »

In order to save user settings for where they place the splitter between the grid and the gantt chart I need an event that triggers when the splitter is dropped at the desired location. The 'resize' event triggers right after the user starts dragging, so it's always off and not where they drop it. Would appreciate help with this.


Post by tasnim »

Hi,

You can find all the splitter events here https://bryntum.com/products/grid/docs/api/Core/widget/Splitter#events

Here is an example of how to listen for splitter events

new Splitter({
	appendTo : 'container',
	listeners : {
		drop() {...}
	}
})

If you have any other questions or concerns, please don't hesitate to reach out to us.


Post by amorimluc »

I'm not using any Splitter object like that though. I mean just the default splitter vertical bar that separates the left grid from the right timeline in the Gantt chart. How can I set a drop even on that vertical bar?


Post by ghulam.ghous »

Hi there,

PLease use this event on gantt:

    listeners : {
        splitterDragStart : (props) => {
            console.log('Splitter Drag Start: ', props);
        },
        splitterDragEnd : (props) => {
            console.log('Splitter Drag End: ', props);
        }
    },

https://bryntum.com/products/gantt/docs/api/Grid/feature/RegionResize#eventhandler-onSplitterDragEnd
https://bryntum.com/products/gantt/docs/api/Grid/feature/RegionResize#eventhandler-onSplitterDragStart

Regards,
Ghous


Post by amorimluc »

That worked, thank you.


Post Reply