{"action":"created","issue":{"url":"https://api.github.com/repos/javve/list.js/issues/315","labels_url":"https://api.github.com/repos/javve/list.js/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/javve/list.js/issues/315/comments","events_url":"https://api.github.com/repos/javve/list.js/issues/315/events","html_url":"https://github.com/javve/list.js/issues/315","id":63105714,"number":315,"title":"Document sort case insensitivity","user":{"login":"bjmiller121","id":6118532,"avatar_url":"https://avatars.githubusercontent.com/u/6118532?v=3","gravatar_id":"","url":"https://api.github.com/users/bjmiller121","html_url":"https://github.com/bjmiller121","followers_url":"https://api.github.com/users/bjmiller121/followers","following_url":"https://api.github.com/users/bjmiller121/following{/other_user}","gists_url":"https://api.github.com/users/bjmiller121/gists{/gist_id}","starred_url":"https://api.github.com/users/bjmiller121/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjmiller121/subscriptions","organizations_url":"https://api.github.com/users/bjmiller121/orgs","repos_url":"https://api.github.com/users/bjmiller121/repos","events_url":"https://api.github.com/users/bjmiller121/events{/privacy}","received_events_url":"https://api.github.com/users/bjmiller121/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-19T22:23:54Z","updated_at":"2015-03-23T09:03:08Z","closed_at":null,"body":"We noticed that, by default, sorting is case sensitive and will put strings starting with a capital letter before strings that are not capitalized.\r\n\r\nFor example ascending sort would result in:\r\n```\r\nAardvark\r\nDeer\r\nMoose\r\nZebra\r\nanteater\r\nbat\r\nwalrus\r\n```\r\n\r\nLooking through documentation, we couldn't find any options to make sort not case sensitive, however, digging through the source, we found that you can use the data attribute `data-insensitive=\"true\"` in your sort trigger, it will make sorting case insensitive.\r\n\r\nWith this set, the above list would be sorted as:\r\n```\r\nAardvark\r\nanteater\r\nbat\r\nDeer\r\nMoose\r\nwalrus\r\nZebra\r\n```\r\n\r\nWould be awesome if this could be documented so people don't have to search the source to find it."},"comment":{"url":"https://api.github.com/repos/javve/list.js/issues/comments/84898870","html_url":"https://github.com/javve/list.js/issues/315#issuecomment-84898870","issue_url":"https://api.github.com/repos/javve/list.js/issues/315","id":84898870,"user":{"login":"jakubgg","id":592475,"avatar_url":"https://avatars.githubusercontent.com/u/592475?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubgg","html_url":"https://github.com/jakubgg","followers_url":"https://api.github.com/users/jakubgg/followers","following_url":"https://api.github.com/users/jakubgg/following{/other_user}","gists_url":"https://api.github.com/users/jakubgg/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubgg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubgg/subscriptions","organizations_url":"https://api.github.com/users/jakubgg/orgs","repos_url":"https://api.github.com/users/jakubgg/repos","events_url":"https://api.github.com/users/jakubgg/events{/privacy}","received_events_url":"https://api.github.com/users/jakubgg/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T09:03:08Z","updated_at":"2015-03-23T09:03:08Z","body":"**tl;dr**\r\nAdd the `data-insensitive=\"true\"` to your html.\r\n\r\n**Full explanation**\r\nThe documentation does not state it clearly, but there is additional attribute that can be added on the search buttons/table headers. \r\nIt is `data-insensitive`. When it is set to `true` all the searches will be 'case insensitive'. The issue here is, when it is not set, the default is `false`. \r\n\r\nSorting on load assumes default as `true` - and sorts 'case insensitive', but then it assumes `false` as default (if there is no `data-insensitive` attribute) and sorts differently. \r\n\r\nHope that helps."}}