{"id":13447788,"url":"https://github.com/sindu12jun/table-dragger","last_synced_at":"2025-10-22T19:49:28.155Z","repository":{"id":50392508,"uuid":"74532908","full_name":"sindu12jun/table-dragger","owner":"sindu12jun","description":"Turn your old table to drag-and-drop table with columns and rows sorting like magic!","archived":false,"fork":false,"pushed_at":"2024-03-05T14:44:50.000Z","size":1498,"stargazers_count":750,"open_issues_count":26,"forks_count":130,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-10-22T19:49:26.400Z","etag":null,"topics":["animation","drag","drop-table","js","order","sort","sort-columns","sortable","sorting","table"],"latest_commit_sha":null,"homepage":"https://sindu12jun.github.io/table-dragger/","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/sindu12jun.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-23T02:32:20.000Z","updated_at":"2025-08-27T08:58:47.000Z","dependencies_parsed_at":"2024-06-18T14:06:34.350Z","dependency_job_id":null,"html_url":"https://github.com/sindu12jun/table-dragger","commit_stats":{"total_commits":91,"total_committers":5,"mean_commits":18.2,"dds":0.2417582417582418,"last_synced_commit":"cef3b63c660cbf7b4726e2194fbf5031d2d9593d"},"previous_names":["sindu12jun/sortabletable"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sindu12jun/table-dragger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindu12jun%2Ftable-dragger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindu12jun%2Ftable-dragger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindu12jun%2Ftable-dragger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindu12jun%2Ftable-dragger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sindu12jun","download_url":"https://codeload.github.com/sindu12jun/table-dragger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sindu12jun%2Ftable-dragger/sbom","scorecard":{"id":826958,"data":{"date":"2025-08-11","repo":{"name":"github.com/sindu12jun/table-dragger","commit":"cef3b63c660cbf7b4726e2194fbf5031d2d9593d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/22 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: license:0","Info: FSF or OSI recognized license: MIT License: license:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T16:48:04.843Z","repository_id":50392508,"created_at":"2025-08-23T16:48:04.843Z","updated_at":"2025-08-23T16:48:04.843Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280503191,"owners_count":26341693,"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","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animation","drag","drop-table","js","order","sort","sort-columns","sortable","sorting","table"],"created_at":"2024-07-31T05:01:26.895Z","updated_at":"2025-10-22T19:49:28.106Z","avatar_url":"https://github.com/sindu12jun.png","language":"JavaScript","readme":"# table-dragger\n\n\u003e Finally, you are able to drag and sort your table as you want.\n\n[![demo.gif][demoPic]][demo]\n\n# Demo\nTry out the [demo][demo]!\n\n# Inspiration\nTable-dragger is a minimalist plain Javascript library for building reorderable drag-and-drop table.\n\n# Features\n- Super easy to set up\n- cellspacing, cellpadding, col and colgroup in account\n- Able to sort columns or rows at the same time\n- Smooth animation when sort\n- No bloated dependencies\n- Touch events\n\n# Install\nYou can get it on npm.\n\n```shell\nnpm install table-dragger --save\n```\nor\n```html\n\u003cscript src=\"../node_modules/table-dragger/dist/table-dragger.min.js\"\u003e\u003c/script\u003e\n```\n\n# Usage\n```\nimport tableDragger from 'table-dragger'\n\ntableDragger(el, options?)\n```\n```html\n\u003ctable id=\"table\"\u003e\n  \u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth class='handle'\u003eheader1\u003c/th\u003e\n    \u003cth class='handle'\u003eheader2\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003econten1\u003c/td\u003e\n    \u003ctd\u003econten2\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n```\n```js\nvar el = document.getElementById('table');\nvar dragger = tableDragger(el, {\n  mode: 'row',\n  dragHandler: '.handle',\n  onlyBody: true,\n  animation: 300\n});\ndragger.on('drop',function(from, to){\n  console(from);\n  console(to);\n});\n```\nAnd you could also not set any options, which defaults to drag with the default options.\n\nThe options are detailed below.\n\n#### `options.mode`\n- Setting `mode` to `column`, user drag and sort columns of table\n- Setting `mode` to `row`, user drag and sort rows of table\n- Setting `mode` to `free`, user drag rows or columns, depending on the direction of the mouse movement after tapping. Notice you have to specify `dragHandler` in `free` mode.\n\n#### `options.dragHandler`\n- `dragHandler` is drag handle selector within table\n- By default, when in `column` mode, `dragHandler` is the first row of table; in `row` mode, the first column.\n\n#### `options.onlyBody`\n- Setting `onlyBody` to `true` in `row` mode, user can only lift rows in `tbody`.\n\n#### `options.animation`\n- ms, animation speed moving items when sorting, `300` — without animation\n\n# API\nThe `tableDragger` method returns a tiny object with a concise API. We'll refer to the API returned by `tableDragger` as `dragger`\n\n#### `dragger.on (Events)`\nThe `dragger` is an event emitter. The following events can be tracked using `dragger.on(type, listener)`:\n\nEvent Name | Listener Arguments               | Event Description\n-----------|----------------------------------|-------------------------------------------------------------------------------------\n`drag`     | `el, mode`                     | `el` is the origin table, `mode` is `column` or `row`, shows the mode user sort\n`drop`  | `oldIndex, newIndex, el, mode`                             | `oldIndex` is the index before sorting. `newIndex` is the index after sorting\n`shadowMove`  | `oldIndex, newIndex, el, mode`                             | trigger when column(row) is being lifted and moving into other column(row) place.\n`out`   | `el, mode`          | column(row) was dragged out of `el`, or dropped\n\n\n#### `dragger.dragging`\nThis property will be true whenever an element is being dragged.\n\n#### `dragger.destroy`\nRemoves all drag and drop events used by `table-dragger` to manage drag and drop.\n\n# License\nMIT\n\n[demo]: https://sindu12jun.github.io/table-dragger/\n[demoPic]: ./resources/dragger.gif\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindu12jun%2Ftable-dragger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsindu12jun%2Ftable-dragger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsindu12jun%2Ftable-dragger/lists"}