{"action":"created","issue":{"url":"https://api.github.com/repos/olifolkerd/tabulator/issues/93","repository_url":"https://api.github.com/repos/olifolkerd/tabulator","labels_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/93/comments","events_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/93/events","html_url":"https://github.com/olifolkerd/tabulator/issues/93","id":189482461,"number":93,"title":"Data is erased when updateRow and Mutator implemented.","user":{"login":"codevite","id":6486235,"avatar_url":"https://avatars.githubusercontent.com/u/6486235?v=3","gravatar_id":"","url":"https://api.github.com/users/codevite","html_url":"https://github.com/codevite","followers_url":"https://api.github.com/users/codevite/followers","following_url":"https://api.github.com/users/codevite/following{/other_user}","gists_url":"https://api.github.com/users/codevite/gists{/gist_id}","starred_url":"https://api.github.com/users/codevite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codevite/subscriptions","organizations_url":"https://api.github.com/users/codevite/orgs","repos_url":"https://api.github.com/users/codevite/repos","events_url":"https://api.github.com/users/codevite/events{/privacy}","received_events_url":"https://api.github.com/users/codevite/received_events","type":"User","site_admin":false},"labels":[{"id":277350033,"url":"https://api.github.com/repos/olifolkerd/tabulator/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":{"login":"olifolkerd","id":6840524,"avatar_url":"https://avatars.githubusercontent.com/u/6840524?v=3","gravatar_id":"","url":"https://api.github.com/users/olifolkerd","html_url":"https://github.com/olifolkerd","followers_url":"https://api.github.com/users/olifolkerd/followers","following_url":"https://api.github.com/users/olifolkerd/following{/other_user}","gists_url":"https://api.github.com/users/olifolkerd/gists{/gist_id}","starred_url":"https://api.github.com/users/olifolkerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olifolkerd/subscriptions","organizations_url":"https://api.github.com/users/olifolkerd/orgs","repos_url":"https://api.github.com/users/olifolkerd/repos","events_url":"https://api.github.com/users/olifolkerd/events{/privacy}","received_events_url":"https://api.github.com/users/olifolkerd/received_events","type":"User","site_admin":false},"assignees":[{"login":"olifolkerd","id":6840524,"avatar_url":"https://avatars.githubusercontent.com/u/6840524?v=3","gravatar_id":"","url":"https://api.github.com/users/olifolkerd","html_url":"https://github.com/olifolkerd","followers_url":"https://api.github.com/users/olifolkerd/followers","following_url":"https://api.github.com/users/olifolkerd/following{/other_user}","gists_url":"https://api.github.com/users/olifolkerd/gists{/gist_id}","starred_url":"https://api.github.com/users/olifolkerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olifolkerd/subscriptions","organizations_url":"https://api.github.com/users/olifolkerd/orgs","repos_url":"https://api.github.com/users/olifolkerd/repos","events_url":"https://api.github.com/users/olifolkerd/events{/privacy}","received_events_url":"https://api.github.com/users/olifolkerd/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-11-15T19:24:10Z","updated_at":"2016-11-17T07:29:34Z","closed_at":"2016-11-17T03:26:02Z","body":"I've implemented  Mutator to limit the Length of entered data\r\nand also an update Row when the Row selected.\r\nbut row data is erased when row is selected.\r\n```\r\nmyDiv.tabulator(\"updateRow\", data.ID, {selected:'1'});\r\n\r\nmutator:function(value, type, data){\r\n    value = value.substring(0, 15);\r\n   return value;\r\n},\r\n```\r\nAm I doing something wrong?\r\nAnd How is the best way to implement a Mask?\r\n"},"comment":{"url":"https://api.github.com/repos/olifolkerd/tabulator/issues/comments/261175123","html_url":"https://github.com/olifolkerd/tabulator/issues/93#issuecomment-261175123","issue_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/93","id":261175123,"user":{"login":"olifolkerd","id":6840524,"avatar_url":"https://avatars.githubusercontent.com/u/6840524?v=3","gravatar_id":"","url":"https://api.github.com/users/olifolkerd","html_url":"https://github.com/olifolkerd","followers_url":"https://api.github.com/users/olifolkerd/followers","following_url":"https://api.github.com/users/olifolkerd/following{/other_user}","gists_url":"https://api.github.com/users/olifolkerd/gists{/gist_id}","starred_url":"https://api.github.com/users/olifolkerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olifolkerd/subscriptions","organizations_url":"https://api.github.com/users/olifolkerd/orgs","repos_url":"https://api.github.com/users/olifolkerd/repos","events_url":"https://api.github.com/users/olifolkerd/events{/privacy}","received_events_url":"https://api.github.com/users/olifolkerd/received_events","type":"User","site_admin":false},"created_at":"2016-11-17T07:29:34Z","updated_at":"2016-11-17T07:29:34Z","body":"Hey , you can mask any input with the html5 ***pattern*** attribute.\r\n\r\nIn this case you would need to create your own variant of the input editor with the appropriate pattern:\r\n```js\r\n//create editor\r\ndatePatternInputEditor = function(cell, value, data){\r\n\t//create and style input\r\n\tvar input = $(\"<input type='text' pattern='\\d{4}-\\d{1,2}-\\d{1,2}'/>\");\r\n\tinput.css({\r\n\t\t\"padding\":\"4px\",\r\n\t\t\"width\":\"100%\",\r\n\t\t\"box-sizing\":\"border-box\",\r\n\t})\r\n\t.val(value);\r\n\tif(cell.hasClass(\"tabulator-cell\")){\r\n\t\tsetTimeout(function(){\r\n\t\t\tinput.focus();\r\n\t\t},100);\r\n\t}\r\n\r\n\t//submit new value on blur\r\n\tinput.on(\"change blur\", function(e){\r\n\t\tcell.trigger(\"editval\", input.val());\r\n\t});\r\n\r\n\t//submit new value on enter\r\n\tinput.on(\"keydown\", function(e){\r\n\t\tif(e.keyCode == 13){\r\n\t\t\tcell.trigger(\"editval\", input.val());\r\n\t\t}\r\n\t});\r\n\r\n\treturn input;\r\n},\r\n\r\n//assign editor to column\r\n$(\"#example-table-demo\").tabulator({\r\n    columns:[\r\n        {title:\"date\", field:\"date\", editor:datePatternInputEditor },\r\n    ]\r\n});\r\n\r\n```\r\n"}}
{"actor":{"display_login":"olifolkerd"}}