{"id":17070553,"url":"https://github.com/oakmac/crazytablejs","last_synced_at":"2025-10-14T23:59:36.305Z","repository":{"id":13893209,"uuid":"16591549","full_name":"oakmac/crazytablejs","owner":"oakmac","description":"crazytablejs","archived":false,"fork":false,"pushed_at":"2014-02-22T19:15:58.000Z","size":232,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T17:26:25.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oakmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-06T19:52:03.000Z","updated_at":"2014-02-22T19:15:58.000Z","dependencies_parsed_at":"2022-08-23T15:51:02.719Z","dependency_job_id":null,"html_url":"https://github.com/oakmac/crazytablejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fcrazytablejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fcrazytablejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fcrazytablejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fcrazytablejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oakmac","download_url":"https://codeload.github.com/oakmac/crazytablejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245090875,"owners_count":20559298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T11:32:12.391Z","updated_at":"2025-10-14T23:59:31.257Z","avatar_url":"https://github.com/oakmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"crazytablejs\n============\n\nGoals:\n- no dependencies\n- progressive enhancement for existing tables in the DOM\n- all options overridable\n- support for 1,000,000 rows (does this make sense?)\n- support for callback data (ie: ajax support)\n- UUCSS classes for every element\n- support for row drawers\n- all of the event handlers in the config\n- support for drag and drop column header sorting\n- support for searching\n- error codes ala autocomplete and chessboard\n\nMethods:\ntable.sort(); // returns the current sort information\n\ntable.sort('col-id'); // sorts on \"col-id\"; toggles the direction\ntable.sort('col-id', 'toggle'); // same as line above, just being explicit\ntable.sort('col-id', 'asc'); // sets sort column and direction\ntable.sort('col-id', function(a, b) {...}); // sort using custom function\n\ntable.sort(2); // sorts on third column (zero-indexed)\ntable.sort(2, 'toggle'); // same as above line, just being explicit\ntable.sort(2, 'asc'); // sort ascending\ntable.sort(2, function(a, b) {...}); // sort third column using provided function\ntable.sort(2, 'asc', function(a, b) {...}); // sort third column ascending using the provided function\n\ntable.rowsPerPage(); // returns the current value\ntable.rowsPerPage(25); // sets the current value\n\ntable.search(); // returns current search value\ntable.search('foo'); // searches for \"foo\"\ntable.clearSearch(); // alias of table.search(\"\")\n\n// need to define what it means to lock the table\ntable.lock(); // locks the table\ntable.unlock(); // unlocks the table\ntable.toggleLock(); // toggle state\ntable.isLocked(); // boolean\n\ntable.refresh(); // make a call to requestData();\n\ntable.isLoading(); // boolean\n\ntable.nextPage();\ntable.prevPage();\ntable.page(); // returns the current page\ntable.page(2); // set to page 2\n\ntable.isLocked(); // returns locked state\ntable.lock(); // locks the table from sorting, searching, pagination, etc\ntable.unlock(); // unlocks the table\ntable.toggleLock();\n\ntable.state(); // returns an object of the table's current state (sort, search, page, etc)\n\nEvents:\n- onMouseEnterRow\n- onMouseLeaveRow\n- onMouseEnterCell\n- onMouseLeaveCell\n- onClickCell\n- onClickRow\n\nColumn level config:\ncellClass - string or function to set the CSS class for the \u003ctd\u003e cells in the column\ncellHTML - string or function to set the innerHTML of the cell element\ncellStyle - string or function, put inline styles on the \u003ctd\u003e element\nheaderClass - string or function to set the CSS class for the \u003cth\u003e element\nheaderHTML - string or function to set the innerHTML of the \u003cth\u003e element\nheaderStyle - string or function, put inline styles on the \u003cth\u003e element\nsortable - boolean, default true\nsortBy - string or function\n  if string, should be a property name of a data object (only goes one level deep)\n  if function, custom sort function for the column\nsortLike - \"string\" \"number\" \"html\", has no effect if sortBy is a function\n(maybe?) width - shorthand for setting the width of a column\nNOTE: all of these should be settable via data-props on the \u003cth\u003e element\n  (where that makes sense)\n\n\nTable level config:\npaginationEnabled - boolean\nsearchEnabled - boolean\nsortEnabled - boolean, superceded by column values\nasync - boolean to determine table mode\nrequestData - function to request data when in async mode\nrowClass - string or function\n\n\nAreas of concern:\n- TODO\n\nAreas of *no* concern:\n- anything \"inside\" a cell or header (HTML)\n- methods of requesting data (ie: AJAX)\n- the way the table looks (ie: CSS), crazytable provides plenty of access to add CSS classes and even style attributes directly on elements, but purposefully does not do any style calculations on the table\n\nOpen questions:\n- how to handle colgroups?\n- how to handle rowspans?\n- tfoot?\n- long-scrolling tables vs pagination?\n- how to handle millions of rows? does this requirement make sense?","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fcrazytablejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foakmac%2Fcrazytablejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fcrazytablejs/lists"}