In Tabulator 3.5, I was able to move rows back and forth between 2 tables. In 4.0, that is no longer possible - I can only move from table A to Table B.
I'm using the CDN version of Tabulator 4.0.4.
To Reproduce
Try moving a row from the second table to the first. I have adapted the example given in the documentation below.
Desktop (please complete the following information):
`
<div id="example-table-sender"></div>
<div id="example-table-receiver"></div>
<script>
var tabledata = [
{name:"Oli Bob"},
{name:"Brendon Philips "},
{name:"Margret Marmajuke "},
{name:"Frank Harbours "},
{name:"Jamie Newhart "},
{name:"Gemma Jane "},
{name:"Emily Sykes "},
{name:"James Newman "}
];
//Table to move rows from
var table = new Tabulator("#example-table-sender", {
height: 311,
layout: "fitColumns",
movableRows: true,
movableRowsConnectedTables: "#example-table-receiver",
movableRowsReceiver: "add",
movableRowsSender: "delete",
placeholder: "All Rows Moved",
data: tabledata,
columns: [{
title: "Name",
field: "name"
}, ],
});
//Table to move rows to
var table = new Tabulator("#example-table-receiver", {
height: 311,
layout: "fitColumns",
movableRows: true,
movableRowsConnectedTables: "#example-table-sender",
movableRowsReceiver: "add",
movableRowsSender: "delete",
placeholder: "Drag Rows Here",
data: [],
columns: [{
title: "Name",
field: "name"
}, ],
});
</script>`
Errors:
tabulator.min.js:7 Uncaught TypeError: t.getElement.addEventListener is not a function
at tabulator.min.js:7
at Array.forEach (
at S.connect (tabulator.min.js:7)
at S.commsReceived (tabulator.min.js:8)
at p.receive (tabulator.min.js:4)
at t.c.tableComms (tabulator.min.js:4)
at tabulator.min.js:4
at Array.forEach (
at p.send (tabulator.min.js:4)
at S.connectToTables (tabulator.min.js:7)
tabulator.min.js:7 Move Row Error - Table cannot accept connection, already connected to table:
tabulator.min.js:8 Uncaught TypeError: Failed to execute 'removeEventListener' on 'EventTarget': The callback provided as parameter 2 is not an object.
at S.disconnect (tabulator.min.js:8)
at S.commsReceived (tabulator.min.js:8)
at p.receive (tabulator.min.js:4)
at t.c.tableComms (tabulator.min.js:4)
at tabulator.min.js:4
at Array.forEach (
at p.send (tabulator.min.js:4)
at S.disconnectFromTables (tabulator.min.js:7)
at S.endMove (tabulator.min.js:7)
Hey @rkarlberg
Thanks for the headsup, that is definitely a bug, i have just pushed a fix for it to the master branch and will include it in this evenings patch update.
Cheers
Oli :)
Thanks Oli! So far, that is the only bug I found, and I have been using Tabulator 4.0 extensively. It's really an amazing product.
Thanks for your kind words.
The move from 3.5 to 4.0 involved stripping out all the jQuery so there was a bunch of automated find and replace involved, unfortunately a small number of bugs managed to get introduced like the one you found.
Let me know if you stumble across any more and I will make sure they are fixed.
In the mean time, if there are any features you would like to see added please let me know if a feature request.
Happy Tabulating!
Oli :)
Ok, I updated my CDN from 4.0.4 to 4.0.5 and it works now - I can verify the bug is fixed. I also signed up on Patreon to support this amazing product. So far, it has all the features I could ask for. Thanks again.
Hey @rkarlberg
Great to hear that is working for you, and Thanks for becoming a Patreon!
Cheers
Oli :)
@olifolkerd I think this issue is happening again in version 4.5.3 and 4.6.0
I can only move 1 direction not bi-directional