tabulator
tabulator copied to clipboard
Allow history module to track row movement in grouped rows
Describe the bug
Once you setup a table with data containing groups, setting the rows movable and setting the history to true, the console throws the error below
Uncaught TypeError: t.getPosition is not a function
at a.value (History.js:37:70)
at InternalEventBus.js:119:25
at Array.forEach (
Tabulator Info
- 5.3.4
Working Example https://jsfiddle.net/xben86zL/11/
To Reproduce A step by step guide to recreate the issue in your JS Fiddle or Codepen:
- Move the first row of the first group to the second group
- See error in console
Expected behavior No error should be thrown.
Desktop (please complete the following information):
- OS: Win 10
- Browser: Edge
- Version: 105.0.1343.42 (Official build) (64-bit)
Additional context Some basic debugging showed that in History.js:36 the "to" variable instead of receiving a row, it receives a group henceforth there's no getPosition() method available
Hey @Sotiris-k
Thanks for getting in touch,
At the moment the history module isn't really compatible with row movement in grouped rows. Though this isn't clearly documented on the website.
I will update the docs to add a warning, but this will be a complex update to the module, for a reasonably unusual set of combined features, so it wont be top of the todo list.
Feel free to submit a PR if it is something you would like to see sooner.
Cheers
Oli :)
Hi @olifolkerd ,
That's a fair assessment.
Thank you for the explanation.