{"action":"opened","issue":{"url":"https://api.github.com/repos/cymonegates/datadictionary/issues/2","repository_url":"https://api.github.com/repos/cymonegates/datadictionary","labels_url":"https://api.github.com/repos/cymonegates/datadictionary/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/cymonegates/datadictionary/issues/2/comments","events_url":"https://api.github.com/repos/cymonegates/datadictionary/issues/2/events","html_url":"https://github.com/cymonegates/datadictionary/issues/2","id":340723645,"node_id":"MDU6SXNzdWUzNDA3MjM2NDU=","number":2,"title":"Adding AlphabetSearch Plugin","user":{"login":"cymonegates","id":38463305,"node_id":"MDQ6VXNlcjM4NDYzMzA1","avatar_url":"https://avatars3.githubusercontent.com/u/38463305?v=4","gravatar_id":"","url":"https://api.github.com/users/cymonegates","html_url":"https://github.com/cymonegates","followers_url":"https://api.github.com/users/cymonegates/followers","following_url":"https://api.github.com/users/cymonegates/following{/other_user}","gists_url":"https://api.github.com/users/cymonegates/gists{/gist_id}","starred_url":"https://api.github.com/users/cymonegates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cymonegates/subscriptions","organizations_url":"https://api.github.com/users/cymonegates/orgs","repos_url":"https://api.github.com/users/cymonegates/repos","events_url":"https://api.github.com/users/cymonegates/events{/privacy}","received_events_url":"https://api.github.com/users/cymonegates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T17:08:33Z","updated_at":"2018-07-12T17:08:33Z","closed_at":null,"author_association":"OWNER","body":"Hi Alex,\r\n\r\nI found a Datatables plugin called alphabetSearch that will allow the data dictionary user to click and search fields alphabetically. I'm just not sure how to integrate it into my R code since I'm not that familiar with Javascript. \r\n\r\nI used this [website](https://www.gyrocode.com/articles/jquery-datatables-alphabetical-search/) for guidance and it has the following code:\r\n\r\n```\r\n$(document).ready(function(){\r\n   var table = $('#example').DataTable({\r\n      dom: 'Alfrtip',\r\n      alphabetSearch: {\r\n         column: 0\r\n      }      \r\n   });\r\n});\r\n\r\n```\r\nOR\r\n\r\n```\r\nvar table = $('#example').DataTable({\r\n   dom: 'Alfrtip',\r\n   alphabetSearch: {\r\n      column: 0\r\n   },\r\n   initComplete: function( settings, json ){\r\n      this.api().alphabetSearch().draw();\r\n   }\r\n});\r\n```\r\n\r\nI just don't know how to integrate this into my current R code shown below that I'm using to create an alphabetically sorted datatable of all the fields in Noodle:\r\n```\r\nprint(htmltools::tagList(\r\n  datatable(\r\n    fieldtable, colnames=c(\r\n      \"Field\",\"Definition\", \"Table\"), \r\n        options = list(autowidth = TRUE,\r\n        order = list(list(0, 'asc')),\r\n        columnDefs = list(list(className = 'dt-left', targets = c(0, 1, 2))),\r\n          pageLength = 25, \r\n          lengthMenu = c(25, 50, 75, 100, 150),\r\n          initComplete = JS(\"\r\n            function(settings, json) {\r\n            \",\"\r\n            $('body').css({\r\n            'font-family': 'Century Gothic', 'font-size': '150%'\r\n            });\r\n            $(this.api().table().header()).css({\r\n            'font-family': 'Century Gothic',\r\n            'font-size':'125%',\r\n            'background-color': '#008000',\r\n            'color': '#fff'\r\n            });\r\n            }\r\n            \")\r\n    ),rownames = FALSE\r\n    )))\r\n```\r\n"}}
{"actor":{"display_login":"cymonegates"}}