{"action":"created","issue":{"url":"https://api.github.com/repos/vedmack/yadcf/issues/340","repository_url":"https://api.github.com/repos/vedmack/yadcf","labels_url":"https://api.github.com/repos/vedmack/yadcf/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/vedmack/yadcf/issues/340/comments","events_url":"https://api.github.com/repos/vedmack/yadcf/issues/340/events","html_url":"https://github.com/vedmack/yadcf/issues/340","id":171068868,"number":340,"title":"yadcf select2 external filter option ordering not as sent through ajax response","user":{"login":"louking","id":875138,"avatar_url":"https://avatars.githubusercontent.com/u/875138?v=3","gravatar_id":"","url":"https://api.github.com/users/louking","html_url":"https://github.com/louking","followers_url":"https://api.github.com/users/louking/followers","following_url":"https://api.github.com/users/louking/following{/other_user}","gists_url":"https://api.github.com/users/louking/gists{/gist_id}","starred_url":"https://api.github.com/users/louking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louking/subscriptions","organizations_url":"https://api.github.com/users/louking/orgs","repos_url":"https://api.github.com/users/louking/repos","events_url":"https://api.github.com/users/louking/events{/privacy}","received_events_url":"https://api.github.com/users/louking/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-14T17:23:05Z","updated_at":"2016-08-15T09:10:18Z","closed_at":null,"body":"Please see http://www.scoretility.com/resultschart?club=fsrcrt . \r\n\r\nTake a look at the response to the ajax retrieve of `_resultschart` when the page is rendered. `yadcf_data_1` is in alphabetic order, but the first option for the Name external filter is from the middle of the list.  \r\n\r\nIn my application, the options are passed from python into javascript through a flask jinja2 template (this detail shouldn't matter) -- the python for datatable options and yadcf options below as `dt_options` and `yadcf_options` respectively. `getcol('runnerid')` resolves to column 1.\r\n\r\n            dt_options = {\r\n                'dom': '<\"dt-chart-table dt-chart-tabledisplay dt-hide\"<\"H\"lBpr>t<\"F\"i>>',\r\n                'columns': [\r\n                    { 'data': 'date',           'name': 'date',             'label': 'Date',        'className': 'dt-body-center dt-chart-nowrap'},\r\n                    { 'data': 'runnerid',       'name': 'runnerid',         'label': 'Runner ID',   'visible': False },\r\n                    { 'data': 'name',           'name': 'name',             'label': 'Name',        'visible': False },\r\n                    { 'data': 'series',         'name': 'series',           'label': 'Series',      'className': 'dt-chart-nowrap' }, \r\n                    { 'data': 'race',           'name': 'race',             'label': 'Race',        'className': 'dt-chart-nowrap'},\r\n                    { 'data': 'miles',          'name': 'miles',            'label': 'Miles',       'className': 'dt-body-center' },\r\n                    { 'data': 'age',            'name': 'age',              'label': 'Age',         'className': 'dt-body-center' },\r\n                    { 'data': 'time',           'name': 'time',             'label': 'Time',        'className': 'dt-body-center' },\r\n                    { 'data': 'pace',           'name': 'pace',             'label': 'Pace',        'className': 'dt-body-center' },\r\n                    { 'data': 'agtime',         'name': 'agtime',           'label': 'AG Time',     'className': 'dt-body-center' },\r\n                    { 'data': 'agpercent',      'name': 'agpercent',        'label': 'AG %age',     'className': 'dt-body-center' },\r\n                ],\r\n                'language' : {\r\n                    'emptyTable': 'no results found for current selection',\r\n                    'zeroRecords': 'no results found for current selection',\r\n                },\r\n                'ordering': True,\r\n                'serverSide': True,\r\n                'order': [0,'asc'],\r\n                'paging': False,\r\n            }\r\n\r\n            filterdelay = 500\r\n            yadcf_options = [\r\n                {\r\n                    'column_number':getcol('runnerid'),\r\n                    'filter_container_id':\"_rrwebapp_filtername\",\r\n                    'filter_type':\"select\",\r\n                    'select_type': 'select2',\r\n                    'filter_reset_button_text': 'clear',\r\n                },{\r\n                    'column_number':getcol('date'),\r\n                    'filter_container_id':\"_rrwebapp_filterdate\",\r\n                    'filter_type':'range_date',\r\n                    'date_format':'yyyy-mm-dd',\r\n                    'filter_delay': filterdelay,\r\n                    'filter_reset_button_text': 'all',\r\n                },{\r\n                    'column_number':getcol('miles'),\r\n                    'filter_container_id':\"_rrwebapp_filterdistance\",\r\n                    'filter_type': 'range_number',\r\n                    'filter_delay': filterdelay,\r\n                    'filter_reset_button_text': 'all',\r\n                },{\r\n                    'column_number':getcol('agpercent'),\r\n                    'filter_container_id':\"_rrwebapp_filteragpercent\",\r\n                    'filter_type': 'range_number',\r\n                    'filter_delay': filterdelay,\r\n                    'filter_reset_button_text': 'all',\r\n                },{\r\n                    'column_number':getcol('series'),\r\n                    'filter_container_id':\"_rrwebapp_filterseries\",\r\n                    'filter_reset_button_text': 'all',\r\n                }\r\n            ]\r\n"},"comment":{"url":"https://api.github.com/repos/vedmack/yadcf/issues/comments/239759773","html_url":"https://github.com/vedmack/yadcf/issues/340#issuecomment-239759773","issue_url":"https://api.github.com/repos/vedmack/yadcf/issues/340","id":239759773,"user":{"login":"louking","id":875138,"avatar_url":"https://avatars.githubusercontent.com/u/875138?v=3","gravatar_id":"","url":"https://api.github.com/users/louking","html_url":"https://github.com/louking","followers_url":"https://api.github.com/users/louking/followers","following_url":"https://api.github.com/users/louking/following{/other_user}","gists_url":"https://api.github.com/users/louking/gists{/gist_id}","starred_url":"https://api.github.com/users/louking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/louking/subscriptions","organizations_url":"https://api.github.com/users/louking/orgs","repos_url":"https://api.github.com/users/louking/repos","events_url":"https://api.github.com/users/louking/events{/privacy}","received_events_url":"https://api.github.com/users/louking/received_events","type":"User","site_admin":false},"created_at":"2016-08-15T09:10:18Z","updated_at":"2016-08-15T09:10:18Z","body":"That takes care of it, thanks. Sorry I opened issue instead of stackoverflow question -- really thought this was a bug."}}
{"actor":{"display_login":"louking"}}