{"action":"created","issue":{"url":"https://api.github.com/repos/olifolkerd/tabulator/issues/1587","repository_url":"https://api.github.com/repos/olifolkerd/tabulator","labels_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/1587/labels{/name}","comments_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/1587/comments","events_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/1587/events","html_url":"https://github.com/olifolkerd/tabulator/issues/1587","id":380277814,"node_id":"MDU6SXNzdWUzODAyNzc4MTQ=","number":1587,"title":"dataEdited callback - get only data/row that changed","user":{"login":"marovargovcik","id":16124144,"node_id":"MDQ6VXNlcjE2MTI0MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/16124144?v=4","gravatar_id":"","url":"https://api.github.com/users/marovargovcik","html_url":"https://github.com/marovargovcik","followers_url":"https://api.github.com/users/marovargovcik/followers","following_url":"https://api.github.com/users/marovargovcik/following{/other_user}","gists_url":"https://api.github.com/users/marovargovcik/gists{/gist_id}","starred_url":"https://api.github.com/users/marovargovcik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marovargovcik/subscriptions","organizations_url":"https://api.github.com/users/marovargovcik/orgs","repos_url":"https://api.github.com/users/marovargovcik/repos","events_url":"https://api.github.com/users/marovargovcik/events{/privacy}","received_events_url":"https://api.github.com/users/marovargovcik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-13T15:23:41Z","updated_at":"2018-11-13T15:58:47Z","closed_at":null,"author_association":"NONE","body":"**Is your feature request related to a problem? Please describe.**\r\nI would like to make ajax request to update data in database but with dataEdited callback I receive all data in the table. Making n (n = count of rows in table) requests to update every row is very ineffective.\r\n\r\n**Describe the solution you'd like**\r\nTo avoid that it would be really nice if we can get more parameters passed to dataEdited callback. Maybe `dataEdited: (rowsAffected, data)` or `dataEdited: (dataEdited, data)`. \r\nThis can be easily implemented (I think): when there input fires `change` event we can capture which row is parent of this edited cell and pass it to `dataEdited` callback.\r\n\r\nThere is also another possible way I can think of and that are custom editors. `editor` callback got these parameters available: cell, onRendered, success, cancel, editorParams \r\nBut `cell` parameter passed is not CellComponent but object with these functions:\r\n```javascript\r\n{\r\n  getElement: ƒ getElement()\r\n  getField: ƒ getField()\r\n  getRow: ƒ getRow()\r\n  getValue: ƒ getValue()\r\n}\r\n```\r\nIf we can get `CellComponent` instead with all available functionality then we can do a lot of stuff for example:\r\n- make ajax request, wait for server response and set updated data back to table\r\n- get row data\r\n- get table instance\r\n\r\nIf there is anything else that can help justify this request, please, let me know and I will provide my full example with additional context.\r\n\r\nLast thing that I want to ask. What would be possible workaround till we don't have this implemented? How can I get table instance and row/cell components from `editor` callback? Or do you have any other idea how can I compare which data in the table changed and make ajax request only for these in `dataEdited` callback? \r\n\r\nMany thanks for your hard work maintaining such awesome project and your help."},"comment":{"url":"https://api.github.com/repos/olifolkerd/tabulator/issues/comments/438319151","html_url":"https://github.com/olifolkerd/tabulator/issues/1587#issuecomment-438319151","issue_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/1587","id":438319151,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODMxOTE1MQ==","user":{"login":"marovargovcik","id":16124144,"node_id":"MDQ6VXNlcjE2MTI0MTQ0","avatar_url":"https://avatars0.githubusercontent.com/u/16124144?v=4","gravatar_id":"","url":"https://api.github.com/users/marovargovcik","html_url":"https://github.com/marovargovcik","followers_url":"https://api.github.com/users/marovargovcik/followers","following_url":"https://api.github.com/users/marovargovcik/following{/other_user}","gists_url":"https://api.github.com/users/marovargovcik/gists{/gist_id}","starred_url":"https://api.github.com/users/marovargovcik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marovargovcik/subscriptions","organizations_url":"https://api.github.com/users/marovargovcik/orgs","repos_url":"https://api.github.com/users/marovargovcik/repos","events_url":"https://api.github.com/users/marovargovcik/events{/privacy}","received_events_url":"https://api.github.com/users/marovargovcik/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T15:58:47Z","updated_at":"2018-11-13T15:58:47Z","author_association":"NONE","body":"Please ignore this feature request. What I was doing wrong:\r\n```javascript\r\neditor: myEditorFunction\r\n```\r\n`myEditorFunction` lost scope so I added\r\n```javascript\r\neditor: myEditorFunction.bind(this)\r\n```\r\nand cell is now CellComponent as it should be."}}
{"actor":{"display_login":"marovargovcik"}}