{"action":"created","issue":{"url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/1036","repository_url":"https://api.github.com/repos/nicolaskruchten/pivottable","labels_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/1036/labels{/name}","comments_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/1036/comments","events_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/1036/events","html_url":"https://github.com/nicolaskruchten/pivottable/issues/1036","id":375880209,"node_id":"MDU6SXNzdWUzNzU4ODAyMDk=","number":1036,"title":"issue with custom aggregator in PivotUi, while passing the aggregator value from another dropdown","user":{"login":"gparida1989","id":44637258,"node_id":"MDQ6VXNlcjQ0NjM3MjU4","avatar_url":"https://avatars1.githubusercontent.com/u/44637258?v=4","gravatar_id":"","url":"https://api.github.com/users/gparida1989","html_url":"https://github.com/gparida1989","followers_url":"https://api.github.com/users/gparida1989/followers","following_url":"https://api.github.com/users/gparida1989/following{/other_user}","gists_url":"https://api.github.com/users/gparida1989/gists{/gist_id}","starred_url":"https://api.github.com/users/gparida1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparida1989/subscriptions","organizations_url":"https://api.github.com/users/gparida1989/orgs","repos_url":"https://api.github.com/users/gparida1989/repos","events_url":"https://api.github.com/users/gparida1989/events{/privacy}","received_events_url":"https://api.github.com/users/gparida1989/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-31T09:53:28Z","updated_at":"2018-11-15T10:49:10Z","closed_at":"2018-11-15T10:49:10Z","author_association":"NONE","body":"Hi,\r\nI am passing a custom aggregator to PivotUi function.\r\nhere the custom aggregator is --\r\n customAggregator = sum() aggregator + aggregator field name from an external parameter\r\n\r\nfirst time it renders the table . But when i change the aggregator field param , it gives the below messege and renders with the last used aggregator field\r\nError : opts.aggregators[aggregator.val(...)] is not a function\r\n\r\nOn debugging i found that the below line causing the issue --\r\nnumInputsToProcess = (ref4 = opts.aggregators[aggregator.val()]([])().numInputs) != null ? ref4 : 0;\r\n\r\nExcept the first time, aggregator.val() is null for the subsequent attempts.\r\nWhile the below code properly set the value ---\r\naggregator = $(\"<select>\").addClass('pvtAggregator').bind(\"change\", function() {\r\n          return refresh();\r\n        });\r\n        ref1 = opts.aggregators;\r\n        for (x in ref1) {\r\n          if (!hasProp.call(ref1, x)) continue;\r\n          aggregator.append($(\"<option>\").val(x).html(x));\r\n        }\r\n\r\n\r\nPlease assist at your earliest.\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/comments/438998586","html_url":"https://github.com/nicolaskruchten/pivottable/issues/1036#issuecomment-438998586","issue_url":"https://api.github.com/repos/nicolaskruchten/pivottable/issues/1036","id":438998586,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODk5ODU4Ng==","user":{"login":"gparida1989","id":44637258,"node_id":"MDQ6VXNlcjQ0NjM3MjU4","avatar_url":"https://avatars1.githubusercontent.com/u/44637258?v=4","gravatar_id":"","url":"https://api.github.com/users/gparida1989","html_url":"https://github.com/gparida1989","followers_url":"https://api.github.com/users/gparida1989/followers","following_url":"https://api.github.com/users/gparida1989/following{/other_user}","gists_url":"https://api.github.com/users/gparida1989/gists{/gist_id}","starred_url":"https://api.github.com/users/gparida1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparida1989/subscriptions","organizations_url":"https://api.github.com/users/gparida1989/orgs","repos_url":"https://api.github.com/users/gparida1989/repos","events_url":"https://api.github.com/users/gparida1989/events{/privacy}","received_events_url":"https://api.github.com/users/gparida1989/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T10:49:10Z","updated_at":"2018-11-15T10:49:10Z","author_association":"NONE","body":"Hi @nicolaskruchten ,\r\n\r\nThe issue solved by removing shadowdom.. it seems pivot table features like (dragNdrop etc) doesn't work smoothly with shadowDom enabled.\r\n\r\nClosing the case"}}
{"actor":{"display_login":"gparida1989"}}