Hello, sorry to bother you with another question but I been dealing with a little problem using row re-ordering in a tree we are building.
Basically, we have a tree of 3 levels, Locations, locations contains Groups and groups contains Positions, all this works as expected but here at Intel decided they would like to be able to ONLY move groups between locations.
In the following screenshot, we are trying to move the group called "Central Factory" inside "Australia NET" location to "Japan GS2".
As you can see, we have the blue line indicating that I want the group below Japan GS2, but when releasing the mouse, what we get is an error as follow:
And the page simply stops working... (this error is fired by one of your scripts somehow) now if we are more carefully the mouse to the end of the Japan GS2 line, then we will see the letters become blue and a little arrow appears on top/left of the line, (as shown in the following screenshot), and if released when that happens it does what it was supposed to do...
The problem we have, is that in most cases, people will release when they see the blue line and that's it, they will not wait for the little arrow to appear or the letters to become blue, they will just forget.
I have removed any restrictions (events) and just enabled the following on my grid:
rowReorder: {
showGrip: true,
listeners: {
gridRowBeforeDragStart: (event) => {
//console.log(event);
//var record = event.context.record;
//if (record.id.startsWith('Group')) return true;
//return false;
},
gridRowBeforeDropFinalize: async (event) => {
//console.clear();
//console.log(event);
//var record = event.context.record;
//var parent = event.context.parent;
//if (parent.id.startsWith('Location')) {
// if (parent.locationId != record.locationId) {
// const result = await bryntum.grid.MessageDialog.confirm({
// title: 'Please confirm',
// message: 'Did you want the row here?'
// });
// return true;
// }
//}
////// true to accept the drop or false to reject
////return result === bryntum.grid.MessageDialog.yesButton;
//return false;
}
},
}
Thank you in advance for any help and or orientation you may bring, we are using v4 of the grid, not sure if this could have something to do.