DHTMLX / gantt

GPL version of Javascript Gantt Chart
https://dhtmlx.com/docs/products/dhtmlxGantt/
GNU General Public License v2.0
1.45k stars 321 forks source link

Upadte executed only once for task when using custom router object in createDataProcessor method #42

Closed Melmoth-the-Wanderer closed 4 years ago

Melmoth-the-Wanderer commented 5 years ago

I also posted on forms here: https://forum.dhtmlx.com/t/upadte-executed-only-once-for-task-when-using-custom-router-object-in-createdataprocessor-method/68510

Hi! I'd like to report a buggy behavior in data processor.

According to the docs, you can pass an object or a function to createDataProcessor() method. I choosed to use an object as follows:

9e3ec6096bfacdd4a3e9f8c9a1fb8c3cce2cfd48_1_414x500

And I noticed strange behavior of data processor - the update() function is executed only once per task! It means that first update invokes the update() function, but any other update does not invoke update() function anymore for this particular task.

I managed to fix the issue by passing function parameter in createDataProcessor() as below:

11f4d19da92caf27aa36f1955bdce0a76fe3aaee_1_690x475

I believe this is a bug in your library. It hapens for update function only (create and delete works fine). Could you please take a look?

Buggy code: https://pastebin.com/QJV8TDwP Working code: https://pastebin.com/MYwxszS1

I'm using pro 6.2.3 version.

Regards, MP